fix: propagate recent develop fixes to sibling packages (2026-05-20)#12218
Draft
Planeshifter wants to merge 3 commits into
Draft
fix: propagate recent develop fixes to sibling packages (2026-05-20)#12218Planeshifter wants to merge 3 commits into
Planeshifter wants to merge 3 commits into
Conversation
Propagates fix from ffbae89 ("chore: fix C lint errors") to sibling benchmark.c files in the `ndarray/base/assert/*` namespace. Adds the `const` qualifier to the `ndims` scalar in each benchmark function; since `ndims` is passed by value, the local-only change does not cascade into header updates. `shape[]` and `strides[]` const-additions were deliberately deferred because the corresponding sibling C headers still take non-const pointers and adding `const` to the local arrays would emit `-Wdiscarded-qualifiers` warnings — defeating the source commit's lint-fix intent.
Propagates fix from 62d6dcc ("fix: avoid duplicate validation overhead and fix default order resolution"). The expression `defaults( 'order' )` ignores its argument and returns the full defaults object instead of the order string, so `DEFAULT_ORDER` was bound to an object and the `getOrder( x ) || DEFAULT_ORDER` fallback in the public wrapper silently produced an object where a string was required. Switches to the `defaults.get( 'order' )` per-key accessor to mirror the base-package fix. The other changes from the source commit (switching inner calls to base APIs to skip validation) do not apply, as the public package is the validating wrapper.
…ations Propagates fix from 9559de0 ("chore: propagate typo and doc-note fixes across `blas` sibling packages") to the namespace-level declarations file that the prior propagation missed. The misleading phrase "find a search vector" (the function searches for a matching row or column, not for the search vector itself) is replaced across 12 JSDoc blocks: 10 row-finding APIs (`cindexOfRow`, `clastIndexOfRow`, `dindexOfRow`, `dlastIndexOfRow`, `gindexOfRow`, `glastIndexOfRow`, `sindexOfRow`, `slastIndexOfRow`, `zindexOfRow`, `zlastIndexOfRow`) get "find a matching row"; 2 column-finding APIs (`gindexOfColumn`, `sindexOfColumn`) get "find a matching column", matching the wording already present in the column packages' own declaration files.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
requested changes
May 20, 2026
Member
kgryte
left a comment
There was a problem hiding this comment.
All of the const changes in this PR should be reverted. Before we can include these changes, all of the functions need to change their signatures to include const parameters. At the moment, that is not the case.
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.
Description
Propagating fixes merged to
developbetween9559de0(2026-05-19 18:52 -0400) and8c6dabd(2026-05-20 03:14 -0700) to sibling packages with the same underlying defect.Pattern: correct default order resolution via
defaults.get()accessor62d6dcc0bfixed a bug in@stdlib/ndarray/base/ndarraylike2ndarray/lib/main.jswheredefaults( 'order' )ignores its argument and returns the full defaults object rather than the order string, soDEFAULT_ORDERheld an object instead of a string, breaking the fallback path whengetOrder( x )returns falsy. The identical defect exists in@stdlib/ndarray/ndarraylike2ndarray, which receives the same single-line fix:defaults( 'order' )→defaults.get( 'order' ). The remaining changes from62d6dcc0b— switching inner calls to base APIs to avoid redundant validation — do not apply here, as@stdlib/ndarray/ndarraylike2ndarrayis the validating public wrapper and must retain those calls.62d6dcc0b(fix: avoid duplicate validation overhead and fix default order resolution)@stdlib/ndarray/ndarraylike2ndarrayPattern: const-qualify compile-time
ndimsscalar inndarray/base/assert/*benchmarksPropagated from
ffbae8968, which addedconstto compile-time-constant arrays and scalars in the benchmark loop ofis-single-segment-compatiblewhile leaving mutated variables (e.g.,offset) unqualified. Thendimsconst addition is propagated to seven sibling packages (theshape[]/strides[]array-const additions were deliberately deferred — see Validation below).ndimsis passed by value, so the local-onlyconstaddition is warning-free across all targets.ffbae8968(chore: fix C lint errors)@stdlib/ndarray/base/assert/is-row-major@stdlib/ndarray/base/assert/is-row-major-contiguous@stdlib/ndarray/base/assert/is-column-major@stdlib/ndarray/base/assert/is-contiguous@stdlib/ndarray/base/assert/is-column-major-contiguous@stdlib/ndarray/base/assert/is-buffer-length-compatible@stdlib/ndarray/base/assert/is-buffer-length-compatible-shapePattern: correct "find a search vector" phrasing in
blas/ext/baseumbrella declarationsCommit
9559de0corrected the misleading phrase "find a search vector" across per-packagelib/*.jsanddocs/types/index.d.tsfiles for the row-finding APIs inblas/ext/base, but the umbrella namespace declarations file atblas/ext/base/docs/types/index.d.tswas missed. This patch replaces all 12 occurrences: 10 with "find a matching row" for the row-finding APIs (cindexOfRow,clastIndexOfRow,dindexOfRow,dlastIndexOfRow,gindexOfRow,glastIndexOfRow,sindexOfRow,slastIndexOfRow,zindexOfRow,zlastIndexOfRow) and 2 with "find a matching column" for the column-finding APIs (gindexOfColumn,sindexOfColumn), matching the wording already present in those packages' own declaration files.9559de093(chore: propagate typo and doc-note fixes across blas sibling packages)@stdlib/blas/ext/base(umbrelladocs/types/index.d.ts)Related Issues
None.
Questions
No.
Other
Validation
Reviewed all 37 commits merged to
developin the 24-hour window. Three propagatable source patterns advanced to the patch stage; per-pattern search scope and validation procedure:ndarray/base/assert/*for theconstlint fix,ndarray/*for thedefaults.get()fix,blas/ext/base/*for the typo correction), widened only when warranted by the pattern signature.blas/ext/basedeclarations file.constplacement, JSvar-style, JSDoc indentation, and wording match the source-commit canonical form.Deliberately excluded:
shape[]/strides[]constadditions inndarray/base/assert/*/benchmark/c/benchmark.csiblings: five of the seven target sibling C headers still declare the pointer parameters asint64_t *shape/int64_t *strides. Addingconstto the local arrays would emit-Wdiscarded-qualifiersat the call sites — directly at odds with the source commit's "fix C lint errors" intent. A complete fix needs accompanying header/implementation patches, which exceeds single-file propagation scope.ad8f9b59d(bench: refactor to use string interpolation in ndarray/base): open PRs bench: refactor to use string interpolation inarray#11411, bench: refactor to use string interpolation inarray/float32#11341, and bench: refactor to use string interpolation inndarray/base#11437 already propagate this pattern to other namespaces; dropped per the open-PR collision gate.050cabaeand2dd6ec1c(stdlib-bot commits): generator-owned files.3df93b0c'sLast argument→Callback argumenterror-message normalization, where "last argument" is intentional in many signatures).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code on behalf of @Planeshifter as an automated propagation of fixes merged to
developover the prior 24 hours. Candidate source commits were filtered for generalizable patterns, sibling sites located via grep-able pattern signatures, and each proposed patch independently validated by parallel reviewer agents (two opus validation passes plus a style-consistency pass) before commits were applied in the primary worktree. A human will audit and promote the PR out of draft.@stdlib-js/reviewers
Generated by Claude Code