Skip to content

[JuliaLowering] Restore partial Julia 1.12 compatibility#62367

Merged
aviatesk merged 1 commit into
masterfrom
avi/JL-1.12-compat
Jul 14, 2026
Merged

[JuliaLowering] Restore partial Julia 1.12 compatibility#62367
aviatesk merged 1 commit into
masterfrom
avi/JL-1.12-compat

Conversation

@aviatesk

Copy link
Copy Markdown
Member

Recent JuliaLowering changes unconditionally referenced runtime features that are unavailable on Julia 1.12. This prevented JuliaLowering and JuliaSyntax from loading or lowering code on that release (esp. in JETLS).

Guard Core.MacroSource, Core.TypeEqOf, and
jl_lowering_world behind availability checks, falling back to Core.Typeof and direct invocation where needed.

The include_string precompile workload remains restricted to newer runtimes because its evaluation path is incompatible with Julia 1.12. Keep the preceding lowering-only workloads enabled there: they do not evaluate lowered code, still exercise the basic lowering pipeline, and remain usable on Julia 1.12.

@aviatesk
aviatesk requested a review from mlechu July 13, 2026 14:07
@aviatesk
aviatesk force-pushed the avi/JL-1.12-compat branch from 299427a to 4ff2c5a Compare July 13, 2026 14:13

@mlechu mlechu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. JuliaSyntax CI is complaining that isdefinedglobal isn't defined, but feel free to merge once that's fixed.

@topolarity

Copy link
Copy Markdown
Member

If we're trying to maintain 1.12 compat this much, should we add a CI job for it?
(similar to the JuliaSyntax jobs)

@mlechu

mlechu commented Jul 13, 2026

Copy link
Copy Markdown
Member

Sure, I wouldn't mind. We probably shouldn't if @aviatesk plans to change the julia version JETLS uses in the immediate future though

Recent JuliaLowering changes unconditionally referenced runtime
features that are unavailable on Julia 1.12. This prevented
JuliaLowering and JuliaSyntax from loading or lowering code on that
release (esp. in JETLS).

Guard `Core.MacroSource`, `Core.TypeEqOf`, and
`jl_lowering_world` behind availability checks, falling back to
`Core.Typeof` and direct invocation where needed.

The `include_string` precompile workload remains restricted to newer
runtimes because its evaluation path is incompatible with Julia 1.12.
Keep the preceding lowering-only workloads enabled there: they do not
evaluate lowered code, still exercise the basic lowering pipeline, and
remain usable on Julia 1.12.
@aviatesk
aviatesk force-pushed the avi/JL-1.12-compat branch from 4ff2c5a to 6505d0d Compare July 14, 2026 03:00
@aviatesk

Copy link
Copy Markdown
Member Author

Well, JuliaLowering is not in a state where it supports v1.12. So a full JuliaLowering test job cannot currently pass on 1.12 because most of the suite executes the lowered output through include_string, and that path requires newer runtime support, e.g. Core.declare_const.

The v1.12 compatibility needed for JETLS is narrower, and if JL can be loaded and the basic parse-to-lowered-IR pipeline works, that is sufficient for JETLS’s purposes.
So if we do this at all, I think a simple smoke job that does not run the full test suite would be enough.
I plan to raise the Julia version supported by JETLS to 1.13/1.14 eventually, but even then we would still want to keep support for 1.12, so such a CI job would indeed be useful.

aviatesk added a commit to JuliaCI/julia-buildkite that referenced this pull request Jul 14, 2026
JuliaLang/julia#62367 restores enough compatibility for JETLS to load
and precompile JuliaLowering on Julia 1.12, although currently there is
no system to detect future regressions, as discussed in the PR.

So this commit adds Linux x86_64 matrix jobs for Julia 1.12 and 1.13
that load JuliaLowering with `JULIA_LOWERING_PRECOMPILE=true`, without
persisting compiled caches, ensuring each job exercises precompilation.
This also registers the new JuliaLowering group in the launch pipeline
renderer.

Note that the full test suite executes lowered code and requires newer
runtime support, so it cannot be used for this minimum compatibility
coverage.

Co-Authored-By: GPT-5.6 Sol <noreply@openai.com>
@aviatesk

Copy link
Copy Markdown
Member Author

I submitted a PR for julia-buildkite to add a new JuliaLowering minimum compatibility test job: JuliaCI/julia-buildkite#566

@aviatesk
aviatesk merged commit 00897fc into master Jul 14, 2026
7 of 9 checks passed
@aviatesk
aviatesk deleted the avi/JL-1.12-compat branch July 14, 2026 05:33
topolarity pushed a commit to JuliaCI/julia-buildkite that referenced this pull request Jul 16, 2026
JuliaLang/julia#62367 restores enough compatibility for JETLS to load
and precompile JuliaLowering on Julia 1.12, although currently there is
no system to detect future regressions, as discussed in the PR.

So this commit adds Linux x86_64 matrix jobs for Julia 1.12 and 1.13
that load JuliaLowering with `JULIA_LOWERING_PRECOMPILE=true`, without
persisting compiled caches, ensuring each job exercises precompilation.
This also registers the new JuliaLowering group in the launch pipeline
renderer.

Note that the full test suite executes lowered code and requires newer
runtime support, so it cannot be used for this minimum compatibility
coverage.

Co-Authored-By: GPT-5.6 Sol <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants