Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make add and dev on a package remove it from the set of weak dependencies #3865

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

KristofferC
Copy link
Member

Fixes #3797

@KristofferC KristofferC changed the title make add and dev on a package remove it from the weakdeps section make add and dev on a package remove it from the set of weak dependencies Apr 9, 2024
@KristofferC KristofferC merged commit 88c38b2 into master Apr 10, 2024
9 checks passed
@KristofferC KristofferC deleted the kc/weakdep_add branch April 10, 2024 09:17
KristofferC added a commit to JuliaLang/julia that referenced this pull request Apr 10, 2024
There is a use case where you have a weak dependency (for one of your
extensions) that is misbehaving and you quickly want to try debug that
issue. A workflow that feels reasonable for this could be:

```
pkg> dev WeakDependency

# do some fixes in this dependency

julia> using Package, WeakDependency
# this loads the extension of Package triggered by loading WeakDependency

# check that things work ok now
```

This doesn't work right now for two reasons:

1. Doing the `dev WeakDependency` will add the dependency to `[deps]`
but not remove it from `[weakdeps]` which means you all of a sudden are
in the scenario described in
https://pkgdocs.julialang.org/v1/creating-packages/#Transition-from-normal-dependency-to-extension
which is not what is desired.
2. The extension will not actually load because you can right now only
trigger extensions from weak deps getting loaded, not from deps getting
loaded.

Point 1. is fixed by JuliaLang/Pkg.jl#3865
Point 2. is fixed by this PR.
KristofferC added a commit that referenced this pull request May 9, 2024
…ndencies (#3865)

* make `add` and `dev` on a package remove it from the weakdeps section
KristofferC added a commit that referenced this pull request Jul 5, 2024
…ndencies (#3865)

* make `add` and `dev` on a package remove it from the weakdeps section
@topolarity
Copy link
Member

I've been running into this on 1.10 - Would it be possible to get a backport?

@KristofferC
Copy link
Member Author

👍

@IanButterworth IanButterworth mentioned this pull request Oct 4, 2024
14 tasks
IanButterworth pushed a commit that referenced this pull request Oct 4, 2024
…ndencies (#3865)

* make `add` and `dev` on a package remove it from the weakdeps section

(cherry picked from commit 88c38b2)
IanButterworth pushed a commit that referenced this pull request Oct 5, 2024
…ndencies (#3865)

* make `add` and `dev` on a package remove it from the weakdeps section

(cherry picked from commit 88c38b2)
@IanButterworth IanButterworth mentioned this pull request Oct 5, 2024
7 tasks
KristofferC added a commit to JuliaLang/julia that referenced this pull request Oct 9, 2024
There is a use case where you have a weak dependency (for one of your
extensions) that is misbehaving and you quickly want to try debug that
issue. A workflow that feels reasonable for this could be:

```
pkg> dev WeakDependency

julia> using Package, WeakDependency

```

This doesn't work right now for two reasons:

1. Doing the `dev WeakDependency` will add the dependency to `[deps]`
but not remove it from `[weakdeps]` which means you all of a sudden are
in the scenario described in
https://pkgdocs.julialang.org/v1/creating-packages/#Transition-from-normal-dependency-to-extension
which is not what is desired.
2. The extension will not actually load because you can right now only
trigger extensions from weak deps getting loaded, not from deps getting
loaded.

Point 1. is fixed by JuliaLang/Pkg.jl#3865
Point 2. is fixed by this PR.

(cherry picked from commit f46cb4c)
topolarity pushed a commit to topolarity/julia that referenced this pull request Oct 29, 2024
… [deps] (JuliaLang#54009)

There is a use case where you have a weak dependency (for one of your
extensions) that is misbehaving and you quickly want to try debug that
issue. A workflow that feels reasonable for this could be:

```
pkg> dev WeakDependency

julia> using Package, WeakDependency

```

This doesn't work right now for two reasons:

1. Doing the `dev WeakDependency` will add the dependency to `[deps]`
but not remove it from `[weakdeps]` which means you all of a sudden are
in the scenario described in
https://pkgdocs.julialang.org/v1/creating-packages/#Transition-from-normal-dependency-to-extension
which is not what is desired.
2. The extension will not actually load because you can right now only
trigger extensions from weak deps getting loaded, not from deps getting
loaded.

Point 1. is fixed by JuliaLang/Pkg.jl#3865
Point 2. is fixed by this PR.

(cherry picked from commit f46cb4c)
KristofferC added a commit that referenced this pull request Oct 30, 2024
…ndencies (#3865)

* make `add` and `dev` on a package remove it from the weakdeps section

(cherry picked from commit 88c38b2)
topolarity pushed a commit to topolarity/julia that referenced this pull request Oct 30, 2024
… [deps] (JuliaLang#54009)

There is a use case where you have a weak dependency (for one of your
extensions) that is misbehaving and you quickly want to try debug that
issue. A workflow that feels reasonable for this could be:

```
pkg> dev WeakDependency

julia> using Package, WeakDependency

```

This doesn't work right now for two reasons:

1. Doing the `dev WeakDependency` will add the dependency to `[deps]`
but not remove it from `[weakdeps]` which means you all of a sudden are
in the scenario described in
https://pkgdocs.julialang.org/v1/creating-packages/#Transition-from-normal-dependency-to-extension
which is not what is desired.
2. The extension will not actually load because you can right now only
trigger extensions from weak deps getting loaded, not from deps getting
loaded.

Point 1. is fixed by JuliaLang/Pkg.jl#3865
Point 2. is fixed by this PR.

(cherry picked from commit f46cb4c)
topolarity pushed a commit to topolarity/julia that referenced this pull request Oct 30, 2024
… [deps] (JuliaLang#54009)

There is a use case where you have a weak dependency (for one of your
extensions) that is misbehaving and you quickly want to try debug that
issue. A workflow that feels reasonable for this could be:

```
pkg> dev WeakDependency

julia> using Package, WeakDependency

```

This doesn't work right now for two reasons:

1. Doing the `dev WeakDependency` will add the dependency to `[deps]`
but not remove it from `[weakdeps]` which means you all of a sudden are
in the scenario described in
https://pkgdocs.julialang.org/v1/creating-packages/#Transition-from-normal-dependency-to-extension
which is not what is desired.
2. The extension will not actually load because you can right now only
trigger extensions from weak deps getting loaded, not from deps getting
loaded.

Point 1. is fixed by JuliaLang/Pkg.jl#3865
Point 2. is fixed by this PR.

(cherry picked from commit f46cb4c)
topolarity pushed a commit to topolarity/julia that referenced this pull request Oct 30, 2024
… [deps] (JuliaLang#54009)

There is a use case where you have a weak dependency (for one of your
extensions) that is misbehaving and you quickly want to try debug that
issue. A workflow that feels reasonable for this could be:

```
pkg> dev WeakDependency

julia> using Package, WeakDependency

```

This doesn't work right now for two reasons:

1. Doing the `dev WeakDependency` will add the dependency to `[deps]`
but not remove it from `[weakdeps]` which means you all of a sudden are
in the scenario described in
https://pkgdocs.julialang.org/v1/creating-packages/#Transition-from-normal-dependency-to-extension
which is not what is desired.
2. The extension will not actually load because you can right now only
trigger extensions from weak deps getting loaded, not from deps getting
loaded.

Point 1. is fixed by JuliaLang/Pkg.jl#3865
Point 2. is fixed by this PR.

(cherry picked from commit f46cb4c)
topolarity pushed a commit to topolarity/julia that referenced this pull request Oct 30, 2024
… [deps] (JuliaLang#54009)

There is a use case where you have a weak dependency (for one of your
extensions) that is misbehaving and you quickly want to try debug that
issue. A workflow that feels reasonable for this could be:

```
pkg> dev WeakDependency

julia> using Package, WeakDependency

```

This doesn't work right now for two reasons:

1. Doing the `dev WeakDependency` will add the dependency to `[deps]`
but not remove it from `[weakdeps]` which means you all of a sudden are
in the scenario described in
https://pkgdocs.julialang.org/v1/creating-packages/#Transition-from-normal-dependency-to-extension
which is not what is desired.
2. The extension will not actually load because you can right now only
trigger extensions from weak deps getting loaded, not from deps getting
loaded.

Point 1. is fixed by JuliaLang/Pkg.jl#3865
Point 2. is fixed by this PR.

(cherry picked from commit f46cb4c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkg> add for a weakdep package does not permanently install package
2 participants