From 783d89262cc2be0cff9b1a7b9d2e7f73e528acb5 Mon Sep 17 00:00:00 2001 From: Matthew Fishman Date: Mon, 14 Sep 2026 10:09:09 -0400 Subject: [PATCH] Fix precompilation on Julia LTS Fixes precompilation on Julia LTS. `TensorAlgebra.one` is a tensor generalization rather than an extension of `Base.one`, but its docstring ended with a bare `one` instead of `function one end`, so the module never got its own binding and Julia 1.10 rejected the method definitions as extending `Base.one` without importing it. Declared now the way `dual` and `isdual` are. Co-Authored-By: Claude Opus 5 (1M context) --- src/factorizations.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/factorizations.jl b/src/factorizations.jl index 5f108cf..1ab3963 100644 --- a/src/factorizations.jl +++ b/src/factorizations.jl @@ -842,8 +842,8 @@ partition is specified either via labels or directly through a bi-permutation; fused codomain and domain sizes must match. `A` is treated as a shape prototype and is not mutated. -Not exported, since exporting would clash with the implicit `Base.one`. Qualify -as `TensorAlgebra.one(A, ...)`. +A tensor generalization in its own right, not an extension of `Base.one`, so it is neither +exported nor imported. Qualify as `TensorAlgebra.one(A, ...)`. See also `MatrixAlgebraKit.one!`. @@ -862,7 +862,7 @@ julia> matricize(Id, Val(2)) ≈ I true ``` """ -one +function one end function one!!(style::MatricizeStyle, A, ndims_codomain::Val; kwargs...) A_mat = matricize(style, A, ndims_codomain)