Repository navigation
chore: rename C source files according to convention - #15435
Merged
Merged
Conversation
…word` Renamed `src/from_word.c` to `src/main.c` and updated the corresponding `manifest.json` source entry. 11 of 13 native packages in `number/float32/base` (84.6%) name their single C source `src/main.c`, as do 1645 packages repository-wide against 84 retaining the legacy package-named form (95.1%). The rename is behavior-neutral: the package's public C surface is the header `include/stdlib/number/float32/base/from_word.h`, which is unchanged, and `binding.gyp` resolves sources through `<@(src_files)` from `manifest.json` rather than by filename. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xn7JS4jsZNBTj4fRBXKFr
Renamed `src/to_word.c` to `src/main.c` and updated the corresponding `manifest.json` source entry. 11 of 13 native packages in `number/float32/base` (84.6%) name their single C source `src/main.c`, as do 1645 packages repository-wide against 84 retaining the legacy package-named form (95.1%). The rename is behavior-neutral: the package's public C surface is the header `include/stdlib/number/float32/base/to_word.h`, which is unchanged, and `binding.gyp` resolves sources through `<@(src_files)` from `manifest.json` rather than by filename. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xn7JS4jsZNBTj4fRBXKFr
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Sep 23, 2026
main.c in number/float32/base/from-word and to-word
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
This pull request:
src/from_word.ctosrc/main.cinnumber/float32/base/from-wordandsrc/to_word.ctosrc/main.cinnumber/float32/base/to-word, updating each package'smanifest.jsonsource entry to match, so that both packages use the C source filename already used by the rest of the namespace.Namespace summary
Audited
@stdlib/number/float32/base.gypfile: true). No member is wholly generator-owned, so all 18 participated.package.jsontop-level/scripts/stdlibkey sets,manifest.jsonkeys, README section set and heading order, test/benchmark/example filenames, public signature, return kind, validation prologue, error construction, JSDoc shape, and source dependencies. Several structural features were additionally voted within the 13-member native sub-population.package.jsonkey sets,scripts,manifest.jsonkeys, return kind, and test/example filenames are all at 100%.keywordsfamily (12/18, 66.7%), and source dependencies (max 4/18, 22.2%).The
keywordsand arity splits are not drift: they separate bit-level type utilities from arithmetic operations. They were excluded rather than forced.number/float32/base/from-wordThe
number/float32/base/from-wordpackage renamedsrc/from_word.ctosrc/main.cand updated the correspondingsrcentry inmanifest.json; 11 of 13 native packages in thenumber/float32/basenamespace (84.6%) already usesrc/main.c, and this brings the package in line with that convention. The build derives sources solely frommanifest.jsonviainclude.gypi/binding.gyp, andsrc/Makefilehardcodes no filename, so no build configuration changes are required. The public headerinclude/stdlib/number/float32/base/from_word.his untouched and the renamed file compiles cleanly; this change is behavior-neutral.number/float32/base/to-wordIn
number/float32/base/to-word,src/to_word.cretained the legacy package-named filename against the namespace's 84.6%src/main.cconvention (11/13 packages) and the repository's 95.1% convention (1645/1729). Renamed tosrc/main.cand updated the correspondingsrcentry inmanifest.json; the public headerinclude/stdlib/number/float32/base/to_word.hand the build graph (binding.gyp,include.gypi,src/Makefile) resolve the source list dynamically and required no changes. Behavior-neutral: the file compiles cleanly and no other reference toto_word.cexists in the repository.Related Issues
No.
Questions
No.
Other
Validation
Checked:
package.json/manifest.jsonkey sets, README headings, test/benchmark/example filenames).lib/main.js,lib/index.js, andlib/validate.js/lib/assign.js/lib/polyfill.jswhere present.confirmed-driftunanimously by all three.from_word.c/to_word.creturns no remaining references, and both renamed sources compile cleanly undergcc -c -Wallagainst the package include path.Deliberately excluded:
assertlackslib/main.js,benchmark/benchmark.js, anddocs/repl.txtbecause it is a namespace aggregator, matchingnumber/float64/base/assertandmath/base/assert.to-float16/lib/main.jscarries no JSDoc because it is theMath.f16roundbuiltin alias behind the standard builtin-vs-polyfill dispatch.from-binary-stringis the only member that validates its argument, which is its documented contract and asserted by its tests.identitykeeps C benchmarks underbenchmark/c/native/, a distinct and actively used convention (477 packages repository-wide, 219 carrying both paths) reproduced in thefloat64andcomplexidentity packages.## See Alsoblocks insignificand,to-float16,ulp-difference, andassertare emitted byremark-stdlib-relatedfrom@stdlib/namespace/pkg2relateddata, which has an empty entry forsignificandand no entry for the other three. This is generator state rather than a README defect and is not addressed here.single-precisionkeyword gap inulp-difference, dropped on materiality — a lone one-line metadata tweak, and the package also lacks the plainsinglekeyword, so adding one keyword would leave it off-pattern regardless.No test expectations, public signatures, or observable behavior are changed by this pull request.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This pull request was prepared by Claude Code running an automated cross-package drift audit of the
number/float32/basenamespace. AI was used to survey the namespace, compute per-feature majority patterns, adversarially validate each candidate finding, and draft this description. The change itself is a mechanical file rename plus a one-linemanifest.jsonupdate in each package; it was verified by a repository-wide reference grep and by compiling both renamed sources. Reviewers should confirm thesrc/main.cnaming convention is in fact desired for these two packages, since the change is consistency-only and carries no functional benefit.@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_011xn7JS4jsZNBTj4fRBXKFr
Generated by Claude Code