Skip to content

chore: use format for error messages in strided build scripts#12178

Merged
kgryte merged 1 commit into
developfrom
philipp/fix-propagation-2026-05-17
May 17, 2026
Merged

chore: use format for error messages in strided build scripts#12178
kgryte merged 1 commit into
developfrom
philipp/fix-propagation-2026-05-17

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Propagating fixes merged to develop between 2026-05-16 23:58:43 -0700 and 2026-05-17 01:31:08 -0700 to sibling packages.

format for error messages in build scripts

Propagates dca1108ec, which replaced +-concatenated throw new Error messages with format() calls from @stdlib/string/format in dataset build scripts, applying the same transformation to code-generation build scripts that retained the old pattern. Each affected script gains a var format = require( '@stdlib/string/format' ); declaration and uses %s specifiers for all interpolated string values.

Affected packages:

  • strided/base/binaryscripts/loops.js
  • math/strided/ops/addscripts/addon.js
  • math/strided/ops/subscripts/addon.js
  • math/strided/ops/mulscripts/addon.js

Related Issues

None.

Questions

No.

Other

Validation

  • Search scope: all */scripts/ build scripts under lib/node_modules/@stdlib/ were searched for throw new Error messages assembled by + concatenation without an existing @stdlib/string/format import.
  • Independent confirmation: two independent reviewers read each of the four target files in full and confirmed the defect, the string-typed interpolants (%s specifiers), the absence of any format identifier collision, and that each change is self-contained within its file.
  • Adaptation and style: an adaptation pass produced the per-site patches; a style-consistency pass verified require ordering, spacing, format specifiers, and tab indentation against docs/style-guides. node --check and a format() output-equivalence check were run on all four files.
  • Deliberately excluded:
    • dff4820f3 (dtslint AccessorArray type expectations) and e31cdb769 (context.getFilename()context.filename) — repository-wide searches returned zero remaining sites.
    • 87731b41d (markdown-lint Makefile variable rename) — no dangling references to the old names and no sibling Makefiles with the analogous misnaming.
    • 10cef3dde (EditorConfig indentation) — formatting conformance with no behavioral or user-visible defect; out of scope for fix propagation.
    • b2eb5da5b (stale is-typed-array "See Also" description) — the candidate text resides in the auto-populated <section class="related"> block marked "Do not manually edit"; the fix belongs to the related-packages generator, not manual edits.

Checklist

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code running an automated fix-propagation routine: it reviewed the last 24 hours of commits merged to develop, identified dca1108ec as a generalizable fix, located sibling build scripts carrying the same defect, validated each candidate site with independent review agents, and applied the equivalent change.


Generated by Claude Code

Propagates fix from dca1108 ("chore: use `format` for error messages
in `datasets/*` build scripts") to sibling code-generation scripts that
still assemble `throw new Error` messages via string concatenation.

Converts `+`-concatenated error strings to `@stdlib/string/format`
calls in `strided/base/binary` and `math/strided/ops/{add,sub,mul}`.
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/strided/ops/add $\color{green}582/582$
$\color{green}+100.00%$
$\color{green}13/13$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}582/582$
$\color{green}+100.00%$
math/strided/ops/mul $\color{green}582/582$
$\color{green}+100.00%$
$\color{green}13/13$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}582/582$
$\color{green}+100.00%$
math/strided/ops/sub $\color{green}582/582$
$\color{green}+100.00%$
$\color{green}13/13$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}582/582$
$\color{green}+100.00%$
strided/base/binary $\color{green}604/604$
$\color{green}+100.00%$
$\color{green}38/38$
$\color{green}+100.00%$
$\color{green}6/6$
$\color{green}+100.00%$
$\color{green}604/604$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte marked this pull request as ready for review May 17, 2026 21:15
@kgryte kgryte requested a review from a team May 17, 2026 21:15
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. labels May 17, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label May 17, 2026
@kgryte kgryte merged commit 7b1cb99 into develop May 17, 2026
53 checks passed
@kgryte kgryte deleted the philipp/fix-propagation-2026-05-17 branch May 17, 2026 21:16
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.

4 participants