-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
allow the Compiler.jl stdlib to be installed on older version of Julia #56553
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aviatesk
force-pushed
the
avi/Compiler-stdlib-compat
branch
from
November 14, 2024 08:36
e6a9ffc
to
da54d89
Compare
aviatesk
added a commit
to JuliaDebug/Cthulhu.jl
that referenced
this pull request
Nov 14, 2024
This requires JuliaLang/julia#56553 to be merged, and the new Compiler.jl stdlib to be registered in General beforehand.
aviatesk
added a commit
to JuliaDebug/Cthulhu.jl
that referenced
this pull request
Nov 14, 2024
This requires JuliaLang/julia#56553 to be merged, and the new Compiler.jl stdlib to be registered in General beforehand.
Keno
reviewed
Nov 14, 2024
aviatesk
force-pushed
the
avi/Compiler-stdlib-compat
branch
from
November 14, 2024 09:08
c4ef8b5
to
2d70790
Compare
Keno
approved these changes
Nov 14, 2024
aviatesk
force-pushed
the
avi/Compiler-stdlib-compat
branch
2 times, most recently
from
November 14, 2024 10:13
214f580
to
92d6adc
Compare
Since #56409, Compiler.jl as a standard library has become available. However, for Julia versions prior to this change, even though the stdlib can be installed via Pkg.jl, the precompilation fails due to code compatibility issues. Consequently, when an external package that uses the Compiler stdlib adds Compiler.jl to its Project.toml, the package would stop working on older Julia versions. To address this, this commit adopts the same approach as JET.jl. Specifically, on older Julia versions, a dummy `Compiler` module is defined, allowing dependent packages to switch between using the Compiler.jl stdlib or the previous `Core.Compiler`. While this is a somewhat hacky solution, it should resolve the issue for now.
aviatesk
force-pushed
the
avi/Compiler-stdlib-compat
branch
from
November 14, 2024 10:15
92d6adc
to
da0116a
Compare
aviatesk
commented
Nov 14, 2024
Ok, now this PR is ready to be merged. |
Keno
approved these changes
Nov 14, 2024
To ensure that stale precompilation caches aren't used.
aviatesk
force-pushed
the
avi/Compiler-stdlib-compat
branch
from
November 14, 2024 12:24
a1edc3f
to
3d0dc3b
Compare
This PR broke the Revise test |
I'll fix it, but just be careful merging things that break that test. |
|
aviatesk
added a commit
to JuliaDebug/Cthulhu.jl
that referenced
this pull request
Nov 15, 2024
This requires JuliaLang/julia#56553 to be merged, and the new Compiler.jl stdlib to be registered in General beforehand.
aviatesk
added a commit
to JuliaDebug/Cthulhu.jl
that referenced
this pull request
Nov 15, 2024
This requires JuliaLang/julia#56553 to be merged, and the new Compiler.jl stdlib to be registered in General beforehand.
aviatesk
added a commit
to JuliaDebug/Cthulhu.jl
that referenced
this pull request
Nov 15, 2024
This requires JuliaLang/julia#56553 to be merged, and the new Compiler.jl stdlib to be registered in General beforehand.
aviatesk
added a commit
to JuliaDebug/Cthulhu.jl
that referenced
this pull request
Nov 15, 2024
This requires JuliaLang/julia#56553 to be merged, and the new Compiler.jl stdlib to be registered in General beforehand.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since #56409, Compiler.jl as a standard library has become available. However, for Julia versions prior to this change, even though the stdlib can be installed via Pkg.jl, the precompilation fails due to code compatibility issues. Consequently, when an external package that uses the Compiler stdlib adds Compiler.jl to its Project.toml, the package would stop working on older Julia versions.
To address this, this commit adopts the same approach as JET.jl. Specifically, on older Julia versions, a dummy
Compiler
module is defined, allowing dependent packages to switch between using the Compiler.jl stdlib or the previousCore.Compiler
. While this is a somewhat hacky solution, it should resolve the issue for now.