-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[JuliaLowering] Restrict K"VERSION" to module arg
#60255
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
Conversation
Fixes stdlib precompilation after JuliaLang#60018: the `v_str` macro produces a `VersionNumber`, which becomes `K"VERSION"`, which is unhandled syntax. I think the intent was to only give it special treatment as the child of a module expression (not make VersionNumber special syntax).
|
Yes, I did not intend a generic VersionNumber <-> K"VERSION" embedding. However, I don't think this PR works as is. First there are two places, this shows up, one is in the module, the other is in |
|
Instead of introducing |
|
That sounds reasonable, but I don't know JuliaLowering well enough to really think it through. |
|
I'll give it a shot. What is the reason for having the |
|
There's no place for the parser to store a |
|
(update after trying it:) Using K"Value" in module would be simpler, but would require differences between SyntaxNode and SyntaxTree (I do want this, but that starts with #60162). The macrocall should work now, though I'm not sure how to reason about it. |
topolarity
left a comment
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.
This is important to get stdlibs green again on JuliaLowering, so I'm merging this as-is, but follow-up feedback is welcome
- `ccall` with a `lib,sym` tuple argument was being desugared to a call to `Core.Tuple` when we actually want an `Expr(:tuple)` - `cfunction` only worked in simple cases, since the check for local variables in scope resolution will fail with any nontrivial function body. I know that using the new `static_eval` head could be considered a bugfix (see discussion at JuliaLang/JuliaLowering.jl#36), but this PR just uses `inert` to match Base. stdlib status: 38/51 (with #60255)
Fixes stdlib precompilation after #60018: the
v_strmacro produces aVersionNumber, which becomesK"VERSION", which is unhandled syntax. Ithink the intent was to only give it special treatment as the child of a
module expression (not make VersionNumber special syntax).