Skip to content

Commit

Permalink
Support weakdeps (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojunfeng authored Sep 11, 2023
1 parent bf94cdb commit afd7e15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions example/FakePkg/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ Comonicon = "863f3e99-da2a-4334-8734-de3dacbe5542"
FromFile = "ff7dd447-1dcb-4ce3-b8ac-22a812192de7"
PkgTemplates = "14b8a8f1-9102-5b29-a752-f990bacb7fe1"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[weakdeps]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[compat]
DelimitedFiles = "1"

[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
6 changes: 6 additions & 0 deletions src/builder/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ function create_command_env(m::Module, envpath::String = mktempdir(); test_deps:
cmd_project = Pkg.Types.Project()
merge!(cmd_project.deps, ctx.env.project.deps)
merge!(cmd_project.compat, ctx.env.project.compat)
if hasproperty(ctx.env.project, :extras)
merge!(cmd_project.extras, ctx.env.project.extras)
end
if hasproperty(ctx.env.project, :weakdeps)
merge!(cmd_project.weakdeps, ctx.env.project.weakdeps)
end
# add the package to dependencies
cmd_project.deps[ctx.env.project.name] = ctx.env.project.uuid

Expand Down

0 comments on commit afd7e15

Please sign in to comment.