-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
compiler:inferenceType inferenceType inferenceregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release
Description
This is a duplicate of JuliaLang/JuliaC.jl#88, here reported upstream, as it is likely an inference failure in Julia that has stumped me. It's possible I did something dumb, but I can't figure it out.
To reproduce:
- Clone https://github.com/jakobnissen/AoC2025
- Check out commit 206a08a253bf7898d0cda32726ce0a658c7fcac0
- Outcomment line 181 in AoC2025.jl - the line containing
println(Core.stdout, Day6.solve(ImmutableMemoryView(b"abc"))) - Attempt to compile with JuliaC 0.2.2, Julia 1.12.3. I used command
juliac --output-exe aoc2025 --bundle build --trim=safe --experimental .
This will fail, with an unresolved call in AoC2025.solve. Some interesting observations:
- The
printstatement at AoC2025.jl:181 somehow makes inference work - Changing the
mapat AoC2025.jl:184 to a for-loop that pushes to a vector also makes it infer, so maybe the issue is withmap - Could it be a captured variable? Seems not; JET reports no such variables, and renaming
solutionin the closure makes no difference. @code_warntypeand JET both claim the relevant functionsAoC2025.solveandAoC2025.Day6.solveare type stable and well-inferred. JET claimsAoC2025.main"failed to optimize due to recursion", but none of the functions are recursive.
Metadata
Metadata
Assignees
Labels
compiler:inferenceType inferenceType inferenceregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release