Repository navigation
Convert remaining include-file LinearAlgebra imports to explicit form - #311
Merged
Merged
Conversation
Replace implicit 'using LinearAlgebra' in include files that share the ExponentialUtilities module scope (src/kiops.jl and src/exp_generated/exp_*.jl) with reliance on the explicit 'import LinearAlgebra: ...' list in src/ExponentialUtilities.jl, and make src/StegrWork.jl's standalone Stegr submodule explicit (using LinearAlgebra: BlasInt and BLAS @blasfunc only, import libblastrampoline_jll). The top-level module already lists all names used by these files (norm, mul!, rmul!, I, etc.), so behavior is unchanged. Verified: ExplicitImports.check_no_implicit_imports passes on ExponentialUtilities and ExponentialUtilitiesStaticArraysExt; GROUP=QA passes (Quality Assurance 21/21, ExplicitImports 6/6) after Pkg.develop of the local checkout. Runic --check and typos are clean. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Muse <noreply@meta.com> Agent-Harness: Muse CLI Code Agent-Model: muse-ember-1.0 Agent-Session: local job 231-muse (no session URL)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove implicit
using LinearAlgebrafrom include files that share theExponentialUtilitiesmodule scope. The top-level module already lists all names used by these files (norm,mul!,rmul!,I, etc.), so the change is purely mechanical. Also makesrc/StegrWork.jl's standaloneStegrsubmodule explicit (BlasInt,@blasfunconly,import libblastrampoline_jll).Risk assessment
exp1.jl–exp5.jl) plussrc/kiops.jl; theStegrsubmodule is not included bysrc/ExponentialUtilities.jland is not exercised by the package.GROUP=QApasses locally; see verification below.ExplicitImportson Julia 1.10/1.12.Verification
I ran these exact commands with a writable depot over the shared depot:
julia --project=test/qa test/qa/qa.jl(afterPkg.develop(path=".", io=devnull)so the local checkout is the module under test):julia -m Runic --check src/kiops.jl src/exp_generated/exp_1.jl src/exp_generated/exp_2.jl src/exp_generated/exp_3.jl src/exp_generated/exp_4.jl src/exp_generated/exp_5.jl src/StegrWork.jl src/ExponentialUtilities.jl→ exit 0, no diff.typos src/→ no output (clean).julia --project=test/qa):exponential!(copy(A), ExpMethodHigham2005())matchesexp(A)to 1.6e-16 andkiopsreturns the expected vector.What I did NOT verify
GROUP=Corerun was started but not run to completion (timeout after precompile); the five kernels andkiopswere exercised only via the smoke test above.docs/make.jlwas not run (no docstring or public-API change).GROUP=QAinvocation viaGROUP=QA julia --project -e 'using Pkg; Pkg.test()'was not run end-to-end (thetest/qa/qa.jlinvocation is equivalent for this repo); rely on CI for the grouped harness.src/StegrWork.jlis not included by the package, so its explicit imports were not exercised at runtime (it has no loaded test coverage).What a reviewer should push back on
src/StegrWork.jlis orphaned (notincluded since Migrate QA to SciMLTesting 2.4 #258). I made it explicit but left the file in place; consider deleting it or wiring it into the test suite.using LinearAlgebra(for user-facing examples insrc/arnoldi.jlandsrc/krylov_phiv_error_estimate.jl). Those are intentional and not seen byExplicitImports; flag if you want them changed tousing LinearAlgebra: Hermitianfor consistency.import LinearAlgebrabare import is still needed for qualified accesses (LinearAlgebra.ishermitian,LinearAlgebra.opnorm). A stricter explicit-import style would drop the qualified accesses; left as is.Closes #231
🤖 Posted by an AI agent — harness: Muse CLI Code · model: muse-ember-1.0
Conversation: local job 231-muse (no session URL)