Skip to content

Commit

Permalink
fix project hash handling
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Dec 20, 2023
1 parent 7d7cbfe commit 33ebbce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1421,12 +1421,17 @@ function add(ctx::Context, pkgs::Vector{PackageSpec}, new_git=Set{UUID}();
end
printpkgstyle(ctx.io, :Compat, """entries added for $(join(compat_names, ", "))""")
end
record_project_hash(ctx.env) # compat entries changed the hash after it was last recorded in update_manifest!
Types.write_project(ctx.env)

# if the project has a pkg in deps and weakdeps write_project changes the project entries
# so we have to re-read to make sure we can hash the project properly
ctx2 = Types.Context()
record_project_hash(ctx2.env)
Types.write_manifest(ctx2.env)

write_env(ctx.env) # write env before building
show_update(ctx.env, ctx.registries; io=ctx.io)
build_versions(ctx, union(new_apply, new_git))
Pkg._auto_precompile(ctx)
Pkg._auto_precompile(ctx2) # use ctx2 otherwise weakdeps that are in deps will be attempted and fail
else
record_project_hash(ctx.env)
write_env(ctx.env)
Expand Down

0 comments on commit 33ebbce

Please sign in to comment.