-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(JLLEnvs): try to load local Artifacts.toml if existed #372
Conversation
if haskey(ENV, "JULIA_CLANG_SHARDS_URL") && !isempty(get(ENV, "JULIA_CLANG_SHARDS_URL", "")) | ||
merge!(JLL_ENV_SHARDS, Artifacts.load_artifacts_toml(ENV["JULIA_CLANG_SHARDS_URL"])) | ||
else | ||
merge!(JLL_ENV_SHARDS, Artifacts.load_artifacts_toml(Downloads.download(JLL_ENV_SHARDS_URL))) | ||
return | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still keep the JULIA_CLANG_SHARDS_URL
environment flag of the highest priority so that people can still debug with specific Artifacts.toml version.
I'm considering directly shipping this Artifact.toml in Clang.jl. |
This is very nice! I have always manually redirected that Artifacts.toml to a local file before. Additionally, we can also avoid directly calling the |
I've thought about this too, but then I feel it brings more future synchronization/maintenance work to do without CompatHelper-like CI tools. Thus I took this tricky version. |
This commit provides two changes: - By default, use the stable release version of `Artifacts.toml` provided by binarybuilderbase. previously it uses the master version, which can sometimes be breaking and troublesome. - it utilizes the local disk cache and thus pkg server so that we don't need to fetch resources from GitHub.com and thus is more friendly to users behind the firewall. As a consequence of getting rid of the need to download from remote server, this commit makes `@time using Clang` much faster: from 1.7s to 0.4s in Julia 1.7, macOS Intel i9-9880H.
58f7627
to
d28f558
Compare
closed in favor of #377 |
Almost certainly I get network issues when
using Clang
in China unless I set proxies. This PR works around it so I figured people might want to see this change.This commit provides two changes:
Artifacts.toml
provided bybinarybuilderbase. previously it uses the master version, which can sometimes
be breaking and troublesome.
fetch resources from GitHub.com and thus is more friendly to users behind the
firewall.
As a consequence of getting rid of the need to download from remote server,
this commit makes
@time using Clang
much faster: from 1.7s to 0.4s in Julia1.7, macOS Intel i9-9880H.