Skip to content
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

Add in_sysimage(pkgid::PkgId) to check if a package is in the sysimage #37652

Merged
merged 4 commits into from
Sep 21, 2020

Conversation

IanButterworth
Copy link
Member

Adds in_sysimage(pkgid::PkgId) for checking if a package is in the sysimage.

Proposed as the correct-est way to filter out packages that definitely won't need precompiling, in JuliaLang/Pkg.jl#2021

Discussed here JuliaLang/Pkg.jl#2018 (comment)

cc. @tkf @fredrikekre

base/Base.jl Outdated Show resolved Hide resolved
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
@tkf
Copy link
Member

tkf commented Sep 19, 2020

I think this is good to go once we have some tests (in and not in stdlib).

@tkf tkf added needs tests Unit tests are required for this change packages Package management and loading labels Sep 19, 2020
@tkf
Copy link
Member

tkf commented Sep 19, 2020

@KristofferC Do you think it works (i.e., in_sysimage returns true) with non-stdlib packages added via PackageCompiler.jl?

@KristofferC
Copy link
Member

@KristofferC Do you think it works (i.e., in_sysimage returns true) with non-stdlib packages added via PackageCompiler.jl?

Probably, yes.

In theory, it should be possible to set this variable once and for all before the sysimage is written, so there is no work at runtime, but that might be more trouble than it is worth.

@staticfloat staticfloat merged commit 5a86131 into JuliaLang:master Sep 21, 2020
@tkf tkf removed the needs tests Unit tests are required for this change label Sep 21, 2020
@IanButterworth IanButterworth deleted the ib/in_sysimage branch September 21, 2020 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants