-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Use GlobalRef of Core.CodeInfo in @generated
#43823
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
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.
Here's a test case that currently errors on nightly:
@test @eval Module() begin
Core = 1
@generated f() = 1
f() == 1
end|
🤦 I realized I couldn't come up with a MWE because I used Julia 1.7.1 instead of 1.6.5 or master. |
Co-authored-by: Simeon Schaub <[email protected]>
|
I added a fix for arguments of name |
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.
Thanks! That's a great first contribution!
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.
Ah, I actually meant to approve this...
Co-authored-by: Simeon Schaub <[email protected]> (cherry picked from commit 8536522)
Co-authored-by: Simeon Schaub <[email protected]>
Co-authored-by: Simeon Schaub <[email protected]>
Co-authored-by: Simeon Schaub <[email protected]>
Co-authored-by: Simeon Schaub <[email protected]> (cherry picked from commit 8536522)
Co-authored-by: Simeon Schaub <[email protected]> (cherry picked from commit 8536522)
Co-authored-by: Simeon Schaub <[email protected]> (cherry picked from commit 8536522)
This PR addresses https://github.com/JuliaLang/julia/pull/40778/files#r784416018 and replaces the reference to
Core.CodeInfoin@generatedwith aGlobalRef.The current implementation caused errors in Turing (TuringLang/Turing.jl#1756) which collected core AD parts in a
Coresubmodule (not anymore, it's renamed toEssentialnow since it's not the first time this caused problems: JuliaLang/Reexport.jl#33 (comment)).Currently the PR is still missing some tests. It's a bit embarrassing but I did not manage to come up with a MWE that would be fixed by this PR. I tried things like
but they all seemed to work fine. Maybe someone has a suggestion how I can reproduce the bug and ensure that
Corein@generatedrefers to the submodule (or something else) withoutCodeInfo?