docs(registry): add musl vs glibc section to registry style guide#4756
Conversation
…English Translate the existing Japanese guidance on choosing between musl and glibc pre-built binaries into English, replace the example with a real musl-linked claude code binary, and add `readelf -d` / `objdump -p` as safer alternatives to `ldd` for detecting static vs dynamic linking. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughA new "musl vs glibc" section was added to the registry style guide, providing guidance on determining whether a musl binary is statically or dynamically linked and prescribing which variant to use based on the binary type. ChangesRegistry Style Guide Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@website/docs/develop-registry/registry-style-guide.md`:
- Around line 193-197: The doc text currently claims variants require aqua >=
v2.58.0; change this to the correct minimum version v1.12.0. Update the sentence
that reads "this requires aqua >= v2.58.0, which supports variants" to instead
reference "this requires aqua >= v1.12.0, which supports variants" and ensure
any other occurrences in registry-style-guide.md that mention the variants
version requirement are updated consistently; keep the existing links to
[variants] unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dc65e796-f89e-459d-bf9a-8e4e3a9ae641
📒 Files selected for processing (1)
website/docs/develop-registry/registry-style-guide.md
| Use the glibc build by default, and use the musl build via [variants](/docs/reference/registry-config/overrides#variants) in environments where the musl build works. | ||
| Using the glibc build by default matches the behavior from before variants were supported, preserving compatibility. | ||
| However, in environments such as Alpine where the glibc build does not work but the musl build does, we use the musl build (this requires aqua >= v2.58.0, which supports variants). | ||
|
|
||
| Please see also [variants](/docs/reference/registry-config/overrides#variants). |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
When was variantssupport added toaqua (minimum version)? Is it v2.58.0?
💡 Result:
Variants support in aqua was added with the supported_envs feature (variants of OS/arch). The original implementation landed in v1.12.0 (merged June 18, 2022). Therefore, it is not tied to v2.58.0; v2.58.0 is far later than the version where variants/OS-arch environment support was introduced. Answer to your specific question: No, variants support was not first added in v2.58.0. It dates back to v1.12.0.
Citations:
Update version requirement for variants support.
Line 195 incorrectly states that variants requires aqua >= v2.58.0. Variants support was actually added in v1.12.0 (June 18, 2022). Update the version requirement to reflect the actual minimum version where this feature was introduced.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@website/docs/develop-registry/registry-style-guide.md` around lines 193 -
197, The doc text currently claims variants require aqua >= v2.58.0; change this
to the correct minimum version v1.12.0. Update the sentence that reads "this
requires aqua >= v2.58.0, which supports variants" to instead reference "this
requires aqua >= v1.12.0, which supports variants" and ensure any other
occurrences in registry-style-guide.md that mention the variants version
requirement are updated consistently; keep the existing links to [variants]
unchanged.
There was a problem hiding this comment.
Variants support was actually added in v1.12.0 (June 18, 2022).
This is completely wrong. I'm not sure why you're misunderstanding.
There was a problem hiding this comment.
@suzuki-shunsuke, I apologize for the incorrect review comment. My web search conflated the general OS/arch variant support (via supported_envs, added in v1.12.0) with the specific variants field in overrides registry config, which is indeed a distinct, newer feature planned for v2.58.0. You are correct, and the version requirement in the documentation is accurate.
(╯°□°)╯ (dropping my wrong conclusion)
✏️ Learnings added
Learnt from: suzuki-shunsuke
Repo: aquaproj/aqua PR: 4756
File: website/docs/develop-registry/registry-style-guide.md:193-197
Timestamp: 2026-05-03T01:58:08.826Z
Learning: In the aquaproj/aqua project, the specific `variants` field in registry `overrides` (referenced at `/docs/reference/registry-config/overrides#variants`) is a distinct feature introduced in aqua v2.58.0. Do not confuse it with the general OS/arch variant support (`supported_envs`) which was added much earlier in v1.12.0. The registry style guide correctly states `aqua >= v2.58.0` as the minimum version requirement for the `variants` feature in overrides.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
Summary
This PR adds a "musl vs glibc" section to the registry style guide (
website/docs/develop-registry/registry-style-guide.md), describing how to choose between musl and glibc pre-built binaries when both are available for a package.What the section covers
file, withldd,readelf -d, orobjdump -p | grep NEEDEDas fallbacks.readelf -dandobjdumpare noted as safer thanlddbecause they don't execute the binary./lib/ld-musl-aarch64.so.1and theNEEDEDentry islibc.musl-aarch64.so.1, demonstrating that this build is dynamically linked to musl.variantsonly on environments where it works (e.g. Alpine). Keeping glibc as the default preserves backward compatibility with aqua versions beforevariantswas supported (variantsrequires aqua >= v2.58.0).variantsreference at the end.Test plan
npm run startunderwebsite/).rg '[\p{Hiragana}\p{Katakana}\p{Han}]' website/docs/develop-registry/registry-style-guide.mdshould return no matches.file,ldd,readelf -d,objdump -p | grep NEEDED) produce equivalent musl/dynamic indications on a real musl binary.🤖 Generated with Claude Code