Skip to content

Keep default values out of global option help#41

Merged
carldebilly merged 2 commits into
yllibed:dev/cdb/issue-33-global-option-helpfrom
autocarl:agent/pr34-remove-default-help
Jun 26, 2026
Merged

Keep default values out of global option help#41
carldebilly merged 2 commits into
yllibed:dev/cdb/issue-33-global-option-helpfrom
autocarl:agent/pr34-remove-default-help

Conversation

@autocarl

@autocarl autocarl commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses review feedback on #34 by keeping the PR scoped to global option descriptions in help output, without introducing default-value rendering.

  • Removes [default: ...] rendering from root global option help.
  • Keeps implicit CLR defaults (false, 0, etc.) from being stored as registration defaults, so caller fallbacks still work for value-typed globals.
  • Keeps the public API compatibility fix from Fix global option descriptions in help output #34: existing AddGlobalOption(...) overloads remain, and description-capable overloads are additive.
  • Updates integration tests to assert descriptions render and default values are not introduced by this PR.
  • Adds accessor regression coverage for value-typed globals registered without explicit defaults, including the description overload.

Follow-up

Created #40 for a dedicated design/implementation of global option default-value rendering, including [DefaultValue] support.

Validation

  • dotnet test src/Repl.Tests/Repl.Tests.csproj -c Release --filter 'FullyQualifiedName~Given_GlobalOptionsAccessor' — 40 passed
  • dotnet test src/Repl.IntegrationTests/Repl.IntegrationTests.csproj -c Release --filter 'FullyQualifiedName~Given_CustomGlobalOptions' — 5 passed
  • dotnet build src/Repl.slnx -c Release -warnaserror --no-restore — 0 warnings/errors
  • dotnet test src/Repl.slnx -c Release — 982 passed
  • npx -y markdownlint-cli2 '**/*.md' — 0 errors
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f044b58450

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/Repl.Core/ParsingOptions.cs Outdated
@autocarl

Copy link
Copy Markdown
Contributor Author

Updated after Codex review: 5bbfac5 preserves caller fallbacks for value-typed global options registered without explicit defaults, adds regression coverage for both generic overloads, and still keeps default-value rendering out of help. Local validation is updated in the PR body.

@carldebilly carldebilly merged commit 8f9f94b into yllibed:dev/cdb/issue-33-global-option-help Jun 26, 2026
6 checks passed
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.

2 participants