docs: fix the consumer sample, list Providers.GitHub, document version pairing - #81
Merged
Merged
Conversation
…n pairing
Three follow-ups now that the providers are being re-cut alongside 2.0.0.
The consumer sample does not compile, and my first review pass missed it. It
declared `public override async Task<int> ExecuteAsync(CommandContext context)`,
but Spectre.Console.Cli 0.55's AsyncCommand takes
`(CommandContext, CancellationToken)` and the member is protected:
CS0534: does not implement inherited abstract member
AsyncCommand.ExecuteAsync(CommandContext, CancellationToken)
CS0507: cannot change access modifiers when overriding
Corrected to protected override with the token parameter, matching this repo's
own commands, and compiled against 0.55.0 rather than eyeballed. This is the
sample showing how to use a token from a command handler, so it is among the
most-copied code in the file.
Providers.GitHub was added to the packages table last pass but not to the
install block; both now list it.
Version pairing is documented because it is what will actually bite on this
release: the providers cap at the major boundary, so 2.x needs 2.x. Stated with
the reason -- the cap converts what would be a runtime MissingMethodException,
since the providers call ICredentialManager, into a resolution error at restore.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Follow-up to #80, now that the provider packages are being re-cut alongside 2.0.0.
A third broken snippet — my first pass missed it
The consumer sample does not compile against the Spectre version this package depends on:
It declared
public override async Task<int> ExecuteAsync(CommandContext context). Spectre.Console.Cli 0.55'sAsyncCommandtakes(CommandContext, CancellationToken)and the member isprotected— which is exactly what this repo's own commands do, so the sample was inconsistent with the code sitting next to it.Corrected and compiled against 0.55.0, not eyeballed. Worth flagging that I reviewed this file end to end last time and still missed it: it is the sample showing how to use a token from a command handler, so probably the most-copied code in the README.
Two additions for the coordinated release
Providers.GitHubwas added to the packages table in #80 but not to the install block. Both now list it.Version pairing, which is the thing most likely to bite on this release:
2.x2.x1.x1.0.1+Stated with the reason rather than as a bare rule: the providers call into
ICredentialManager, which changed shape in 2.0.0, so a1.xprovider assembly against2.xof this package would fail at runtime withMissingMethodException. The major cap turns that into a resolution error at restore time.Verification
Build clean, no code changed. The corrected sample compiles against Spectre.Console.Cli 0.55.0.
🤖 Generated with Claude Code