GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — feat(argv): a flag whose value may be left off by jdx · Pull Request #969 · jdx/usage feat(argv): a flag whose value may be left off #969New issueHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails. Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filterConversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page. Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page. Diff viewDiff view
Prev
fix(derive): refuse a value_optional nothing reads, and record it as …
…clap's loss Two rounds of feedback on #969, and the second round corrected the first fix. **The guard was testing the wrong thing.** `is_arg` is only true where `arg` was written, so `#[usage(value_optional)] out: Option<String>` — a positional by default, with no `long`, `short` or `arg` — still compiled and was dropped. It now tests `is_flag`, which covers both spellings of a positional. Only a flag's value has a say in this: a positional's brackets come from its type, so the page went on saying the opposite of what was declared. **And clap must not be told.** The first fix emitted `num_args = 0..=1`, reasoning that clap can express an optional value and a `skipped.note` would report a limitation it does not have. That was wrong, and Bugbot said so plainly: `value_optional` is help-only — usage-lib's parser refuses a bare `--bump` exactly as it refuses a bare `--port` — so declaring it in clap makes the clap shadow accept a line the usage shadow rejects. The pair exists to be one grammar told to two frameworks, and a fixture that quietly changes the grammar is worse than one that reports a gap. So it is a note after all, and a truthful one: clap cannot print `[BUMP]` without also accepting `--bump` on its own. Both mutation-checked.
Uh oh!
There was an error while loading. Please reload this page.
commit 9560b0e79836b1b0e47fba7d1e40b89709105bcf
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
|
| You are visitor 01402809 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |