Skip to content

Fix docs-builder version output#3327

Closed
theletterf wants to merge 1 commit into
mainfrom
fix-version-output
Closed

Fix docs-builder version output#3327
theletterf wants to merge 1 commit into
mainfrom
fix-version-output

Conversation

@theletterf

Copy link
Copy Markdown
Member

Why

docs-builder --version was reporting the CLR assembly version (1.0.0.0) instead of the semantic release version shown by older releases.

What

Handle the fast --version path before Argh's intrinsic handler and print the assembly informational version, falling back only when that metadata is unavailable.

Made with Cursor

Print the semantic informational version for the fast --version path so the CLI reports the release version instead of the CLR assembly version.

Co-Authored-By: GPT-5.5 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@theletterf theletterf requested a review from a team as a code owner May 16, 2026 08:02
@theletterf theletterf added the bug label May 16, 2026
@theletterf theletterf requested a review from technige May 16, 2026 08:02
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e860b7c7-fd1a-4010-aaf2-dc3e16a53e8c

📥 Commits

Reviewing files that changed from the base of the PR and between b7a44d2 and c01cfa1.

📒 Files selected for processing (1)
  • src/tooling/docs-builder/Program.cs

📝 Walkthrough

Walkthrough

This PR adds early explicit handling for the --version command-line argument in the docs-builder entry point. Before constructing the service host, the program now checks for --version, extracts the executing assembly's informational version attribute (falling back to assembly version or "unknown" if unavailable), writes it to stdout, and exits immediately. The System.Reflection namespace is added to support version attribute lookup, and the pre-host fast-path comment is updated to reflect this new behavior.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: resolving incorrect version output from the docs-builder tool.
Description check ✅ Passed The description directly addresses the changeset, explaining the problem (incorrect version reporting) and the solution (handling --version before Argh's handler).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix-version-output

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Mpdreamz Mpdreamz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs fixing in upstream nullean/argh

@Mpdreamz

Copy link
Copy Markdown
Member

nullean/argh#54

@theletterf

Copy link
Copy Markdown
Member Author

Closing this local workaround in favor of fixing the version source in Argh itself.

Upstream PR: nullean/argh#55

@theletterf theletterf closed this May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants