Repository navigation
Restore type-stable StridedView construction on Julia 1.10 - #60
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
This is clearly less nice, but I do think it is worth it to fix the type stability regression on 1.10... |
Jutho
reviewed
Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jutho
approved these changes
Oct 13, 2026
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
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.
#58 added a
normalize::Bool = truekeyword to theStridedViewconstructors, with an early return fornormalize = false. The two branches produce different parent types (Matrixas given vs the normalizedVector), and Julia 1.10 does not constant-fold the keyword, so evenStridedView(::Matrix)infers as aUnionthere. This breaks the@inferredbroadcast tests of Strided.jl on Julia 1.10 (QuantumKitHub/Strided.jl#93).This replaces the keyword by a public (unexported)
unsafe_stridedview(T, parent, size, strides, offset, op)that skips normalization, used at all formernormalize = falsecall sites, and adds an@inferred(StridedView(A))test. Removing the keyword is technically an API change, but it was only exposed in v0.5.4, so this is released as v0.5.5.Checked on Julia 1.10.12: the StridedViews tests pass, and Strided's
othertests.jlpasses against this branch.🤖 Generated with Claude Code