Clamp julia syntax version to 1.13 when creating manifests#4545
Open
Clamp julia syntax version to 1.13 when creating manifests#4545
Conversation
73d2470 to
9c50d95
Compare
KristofferC
reviewed
Nov 28, 2025
test/manifests.jl
Outdated
| # having their syntax version set too low (which would cause the parser | ||
| # to reject newer syntax features like `import ... as`) | ||
|
|
||
| mktempdir() do test_dir |
Member
There was a problem hiding this comment.
This feels like kind of "bloaty" tests. Ok, to have one full manifest test for compat and one for syntax but then the rest can maybe just be unit style tests that can be tested on a single line?
Member
Author
There was a problem hiding this comment.
I do think all four cases are reasonable, but yeah, the implementation is a bit bloaty. Will have claude condense it.
Fix issue where packages with ancient compat declarations like `julia = "1"` would have their syntax version set to v1.0, causing the parser to reject newer syntax features like `import ... as`. Since syntax versioning was introduced in Julia 1.14, we now clamp the syntax version to at least v1.13 (NON_VERSIONED_SYNTAX) to match the logic in Base.loading.jl. This also fixes a bug in the original function where it referenced `syntax_table["julia_version"]` instead of `p.julia_syntax_version`. Fixes JuliaLang/julia#60273
9c50d95 to
26fc759
Compare
Member
Author
|
@KristofferC good to go? |
This file contains hidden or 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
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.
Pkg side of julia#60275. Base clamps this when loading explicitly from a Project.toml, so to the extent that a manifest is a compacted summary of Base's loading behavior, it should clamp as well. Of course, this isn't strictly necessary after the Base PR merges, but I think it makes sense to have the manifest reflect what loading would do, rather than what was in the Project.toml.