Skip to content

Commit

Permalink
make add and dev on a package remove it from the set of weak depe…
Browse files Browse the repository at this point in the history
…ndencies (#3865)

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

(cherry picked from commit 88c38b2)
  • Loading branch information
KristofferC authored and KristofferC committed Dec 13, 2024
1 parent 9895ccd commit 61ea85b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/extensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ using UUIDs
Pkg.activate(joinpath(dir, "TestWeakDepProject"))
Pkg.resolve()
@test Pkg.dependencies()[UUID("2ab3a3ac-af41-5b50-aa03-7779005ae688")].version == v"0.3.26"

# Check that explicitly adding a package that is a weak dep removes it from the set of weak deps
ctx = Pkg.Types.Context()
@test "LogExpFunctions" in keys(ctx.env.project.weakdeps)
@test !("LogExpFunctions" in keys(ctx.env.project.deps))
Pkg.add("LogExpFunctions")
ctx = Pkg.Types.Context()
@test "LogExpFunctions" in keys(ctx.env.project.deps)
@test !("LogExpFunctions" in keys(ctx.env.project.weakdeps))
end
end
end

0 comments on commit 61ea85b

Please sign in to comment.