Skip to content

Commit

Permalink
Drop Base TOML cache when binding artifacts
Browse files Browse the repository at this point in the history
We need to clear this cache when modifying the TOML file.  This should fix #3212.

It might be nice to expose a `Base.drop_parsed_toml(path::String)` API so that I don't have to manually reach into `TOML_CACHE.d` here like this.
  • Loading branch information
staticfloat authored Oct 24, 2022
1 parent d5d6470 commit 5f86f2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ function bind_artifact!(artifacts_toml::String, name::String, hash::SHA1;
open(artifacts_toml, "w") do io
TOML.print(io, artifact_dict, sorted=true)
end
# Drop any base caches that refer to this file
delete!(Base.TOML_CACHE.d, artifacts_toml)
end

# Mark that we have used this Artifact.toml
Expand Down

0 comments on commit 5f86f2b

Please sign in to comment.