Skip to content

Isolate LHLFactorization dependency binding for JET - #1262

Draft
ChrisRackauckas-Claude wants to merge 3 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix/lhlfactorization-jet-name-conflict
Draft

Isolate LHLFactorization dependency binding for JET#1262
ChrisRackauckas-Claude wants to merge 3 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix/lhlfactorization-jet-name-conflict

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

What changed and why

Import the dependency's LHL implementation names inside a private binding module, then copy only those bindings into the LinearSolve module. JET's package analysis treats importing the dependency module name LHLFactorization into LinearSolve as an invalid redefinition because LinearSolve already defines the public algorithm type with that name; isolating the dependency module name removes the collision without exporting new names or suppressing a report.

This draft is stacked on #1261, which is itself stacked on #1260. It should be reviewed after both prerequisites. Please ignore it until it has been reviewed by @ChrisRackauckas.

Failing before

On clean main at 5dcf04d29038b5e4e4938157e9834fd8ddcf5f7a, JET.report_package(LinearSolve) reports seven errors beginning with:

invalid redefinition of constant LinearSolve.LHLFactorization

The full Julia 1.11.9 QA result was:

Quality Assurance | Pass 47 Fail 2 Error 1 Total 50 Time 6m37.8s

An adjacent-history check reports zero package-analysis errors at parent commit a449aab53f03a0aba833a502df409bf86b08de8f and seven after 47cdfb2eb81757346bb06cd8a3053a9736d15291, which added the dependency import and the algorithm type with the same name.

Passing after

The focused Julia 1.11.9 check reports:

stale imports: nothing
JET reports: 0

The final stack was then validated with:

GROUP=QA julia +1.11 --project=. -e 'using Pkg; Pkg.test()'
GROUP=Core julia +1.11 --project=. -e 'using Pkg; Pkg.test()'
julia +1.12 --project=/home/crackauc/.julia/environments/runic -m Runic --check src/LinearSolve.jl src/blocked_lufact.jl src/lhl.jl
typos src/LinearSolve.jl src/blocked_lufact.jl src/lhl.jl
git diff --check origin/main...HEAD

Results:

JET Tests | 25 pass, 18 broken, total 43, 2m21.3s
Allocation QA | 55 pass, total 55, 1m18.8s
SupernodalLU Allocation QA | 6 pass, total 6, 11.8s
Quality Assurance | 50 pass, total 50, 9m41.3s
Testing LinearSolve tests passed

Core examples:
Re-solve | 143 pass, total 143
SupernodalLU internals | 91 pass, total 91
Default Alg Tests | 133 pass, total 133
Adjoint Sensitivity | 138 pass, total 138
ForwardDiff Overloads | 147 pass, total 147
SpecializingFactorizations | 18 pass, total 18
Testing LinearSolve tests passed

The full Core command exited 0 after 36m10s. Runic, typos, and git diff --check exited 0 with no output. Documentation was not built because the helper module and copied bindings are internal and this changes no public API or documentation.

Review notes

An import alias did not eliminate the JET collision. The private binding module is intentionally narrow: it prevents the dependency module name from entering LinearSolve while leaving the existing internal call sites unchanged. The PR contains both prerequisite commits because it is stacked; the new change for this PR is the src/LinearSolve.jl binding isolation.

🤖 Generated with Claude Code
https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512

ChrisRackauckas and others added 3 commits August 26, 2026 20:29
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
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.

2 participants