You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pkg> add a package that's already in your Project.toml as a weakdep, Pkg gets mildly indecisive and installs all of the package + deps only to remove them on the next package operation.
MWE:
$ cat Foo/Project.tomlname = "Foo"uuid = "721b2572-63d0-4bb6-a91e-fe9952250d90"authors = ["Cody Tapscott <[email protected]>"]version = "0.1.0"[weakdeps]CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"[compat]CUDA = "4"
$ julia --project=Foo -q(Foo) pkg> add CUDA<adds a ton of CUDA + dependent packages>(Foo) pkg> add TOML<immediately removes all of CUDA + its dependent packages>
It is a bit concerning that > add Foo can have an inconsistent concept of the state after an add versus the rest of Pkg.
The text was updated successfully, but these errors were encountered:
topolarity
changed the title
pkg> add for a weakdep package does not perminately install packagepkg> add for a weakdep package does not permanently install package
Feb 14, 2024
The reason for this is that when Pkg reads a project and sees that it is both a weakdep and a dep it ignores the dep entry (so that extensions can be used in a backwards compatible manner).
The solution here might be to just delete the weak dep entry when an explicit add is made.
But on the other hand, having extensions while having strong deps on the triggers for those extensions is very likely to run into a cycle analogous to JuliaLang/julia#52511 (comment).
If you
pkg> add
a package that's already in your Project.toml as a weakdep, Pkg gets mildly indecisive and installs all of the package + deps only to remove them on the next package operation.MWE:
It is a bit concerning that
> add Foo
can have an inconsistent concept of the state after an add versus the rest of Pkg.The text was updated successfully, but these errors were encountered: