Fix --version and __schema to report the semantic release version#3331
Fix --version and __schema to report the semantic release version#3331theletterf wants to merge 2 commits into
Conversation
Argh was reporting the CLR assembly file version (1.0.0.0) instead of the MinVer-assigned informational version. Both --version and __schema are now intercepted before Argh's intrinsic handler so they print the AssemblyInformationalVersionAttribute value — which on tagged releases is the clean semver (e.g. 1.9.0) and on canary builds includes the pre-release suffix. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR modifies the docs-builder entry point to ensure the CLI version and schema output report the informational version from assembly metadata rather than the CLR runtime assembly version. It extracts 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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 |
|
Fixing this in Argh instead again :) |
|
No longer needed :) |
Why
docs-builder --versionwas printing the CLR assembly file version (1.0.0.0) instead of the MinVer-assigned semantic version. The same value leaked into theversionfield of the__schemaoutput (used to generatedocs/cli-schema.json). On a tagged release the version should be clean — e.g.1.9.0— not the CLR default.This is a follow-up to the Nullean.Argh 0.16.2 bump (#3330), which exposed the mismatch because Argh 0.16.2 switched from
AssemblyFileVersionAttributetoAssemblyInformationalVersionAttributeinternally. The same fix applies to Argh 0.16.0 as well.What
Both
--versionand__schemaare now intercepted inProgram.csbefore Argh's intrinsic handler runs:--versionprintsAssemblyInformationalVersionAttributedirectly and exits.__schemaredirectsConsole.Outto aStringWriter, registers aProcessExithandler that patches theversionJSON field with the informational version, then lets Argh write and exit as normal.docs/cli-schema.jsonis regenerated to reflect the change (1.0.0.0→1.0.0for local non-MinVer builds; tagged releases will show the clean semver).