-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have 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
Add an example of a negative flag (i.e. --no-verbose) #281
Conversation
Question from #280
Frankly, I don't think that we should attempt to document usage of I would like to propose a separate " |
until now, I've collected in the example "classical" questions about use cases, mainly from questions as this one. People seems to look at it, and if not, I just point to the example if such a question arrise. Then, if you want to write a |
And examples doesn't go in docs.rs afaik, and having these examples compiling is also of interest. |
Oh, you mean |
Yep, this is a new file in the example folder |
I don't get the Ctrl+F thing. OK for a README.md in the examples folder, but i think that's not related to this PR. |
I mean, there's no easy way to perform a search. Examples are just a bunch of
Yeah, this is meant to address the lack of description. For example: # Collection of useful tips and tricks
### Parse "true" or "false" literals as `bool` flag
[Short description, detailed description goes into the file]
Parse `"true"` or `"false"` literals as CLI flag and turn it into a `bool` field.
[Full example](link to rs file)
[Origin](link to issue/PR/comment)
[Short snippet, nothing fancy, core idea only, detailed description should be put into the corresponding file]
```rust
type Flag = bool;
#[derive(StructOpt)]
struct Opt {
flag: Flag
}
... other entries, sorted alphabetically This way we can direct the browser to |
OK, but I'd prefer no code in the README, that's a pain to maintain. |
I thought these examples never change spontaneously, only on major releases. |
That's easy to forget to change the README at a new breaking change release, or when you update the code of the example, or when you do a bad copy/paste that doesn't compile. As the example must be short, reading the example should be accessible. |
Hey, @TeXitoi , is this blocked on something so you can't merge it? |
I was waiting for you to merge or approve the merge request. We need to define a workflow ;-) What about "the author of the pull request can merge himself after an approve, or a "too big" timespan without feedbacks"? |
Sure, I think 4 days would be a good "no reply" time span |
Also, I think it would be sencible to allow merges without an approval as long as it's small and it doesn't change anything in |
OK, deal! ;-) |
Did you received my crates.io invitation? |
Also, where is the "approve" button here? I couldn't find it :) |
When looking at the diff, you have an approve button |
Review changes |
Ooops, I totally missed it. I didn't receive an email so I didn't know about it, sorry.
Are you asking me to review some changes or keep explaining the location of "approve" button? I found it :) |
keep explaining the location of "approve" |
For publishing, I always publish structopt-derive and structopt at the same time with the same version, even if most of the time structopt doesn't need an update. That's clearer if the version numbers are the same. So, the publish workflow is, for now:
We can change that if you have a better idea. |
That's a good workflow, but I would advice to do Also, maybe I'll even find some time and write a script to automatize stuff, mundane manual actions tend to have some really unpredictable mistakes snaked in :) Hail machines, hail SkyNet! |
And, just so you know, if you need to get in touch with me for some reason that is unrelated to github (like the crates.io invite) you should send me an email, I typically check it at least once a day. the same if you're need a reply from me as soon as possible. |
Do you still need |
good catch, removed |
OK, the one listed in your profile? |
Yep |
You can also join me by email at texitoi AT texitoi DOT eu if needed. |
Question from #280