Skip to content

Conversation

@KristofferC
Copy link
Member

@KristofferC KristofferC commented Feb 5, 2025

Fixes #56865. The Compiler "stdlib" resides in a different location so the current logic didn't handle updating it.

The

compiler_folder = dirname(string(methods(Core.Compiler.eval)[1].file))

line to figure out the build path to the compiler feels very ugly. It is also something that is constant so doing it every time is wasteful...

@KristofferC KristofferC added bugfix This change fixes an existing bug backport 1.12 Change should be backported to release-1.12 labels Feb 5, 2025
@KristofferC KristofferC changed the title udpate path to Compiler stdlib to a valid one udpate path to Compiler stdlib to a valid one similar to how it is done for other stdlibs Feb 5, 2025
@KristofferC KristofferC mentioned this pull request Feb 6, 2025
32 tasks
@KristofferC KristofferC force-pushed the kc/fix_functionloc_Compiler branch from 7215684 to 157774c Compare February 6, 2025 12:10
path = npath == npath′ ? path : npath′
end
if isdefined(@__MODULE__, :Core) && isdefined(Core, :Compiler)
compiler_folder = dirname(string(methods(Core.Compiler.eval)[1].file))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Keno, do you have a more aesthetically pleasing way to do this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, there is #55963.

@topolarity topolarity changed the title udpate path to Compiler stdlib to a valid one similar to how it is done for other stdlibs update path to Compiler stdlib to a valid one similar to how it is done for other stdlibs Feb 12, 2025
@KristofferC KristofferC merged commit 9339dea into master Feb 12, 2025
5 of 8 checks passed
@KristofferC KristofferC deleted the kc/fix_functionloc_Compiler branch February 12, 2025 12:11
KristofferC added a commit that referenced this pull request Feb 13, 2025
…ne for other stdlibs (#57274)

Fixes #56865. The Compiler "stdlib" resides in a different location so
the current logic didn't handle updating it.

(cherry picked from commit 9339dea)
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Feb 14, 2025
KristofferC added a commit to KristofferC/CodeTracking.jl that referenced this pull request Mar 21, 2025
This allows us to automatically get new functionality like JuliaLang/julia#57274.
KristofferC added a commit to JuliaDebug/CodeTracking.jl that referenced this pull request Apr 2, 2025
This allows us to automatically get new functionality like JuliaLang/julia#57274.
KristofferC added a commit to KristofferC/CodeTracking.jl that referenced this pull request Apr 16, 2025
This allows us to automatically get new functionality like JuliaLang/julia#57274.
mhauru added a commit to mhauru/Mooncake.jl that referenced this pull request Oct 23, 2025
This comes up because in Julia 1.12 logmsg_code gets the folder of
Core.Compiler if needed to resolve paths, which results in a ccall
with no known rule. See
JuliaLang/julia#57274.
yebai pushed a commit to chalk-lab/Mooncake.jl that referenced this pull request Oct 23, 2025
* Mark Base.fixup_stdlib_path as having @zero_derivative

This comes up because in Julia 1.12 logmsg_code gets the folder of
Core.Compiler if needed to resolve paths, which results in a ccall
with no known rule. See
JuliaLang/julia#57274.

* Make Base.CoreLogging.handle_message_nothrow as having @zero_derivative

This comes up in logmsg_code, because in Julia v1.12
handle_message_nothrow got a try-catch structure, which creates an
UpsilonNode that Mooncake can't handle.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@edit doesn't work on Compiler in 1.12

1 participant