-
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
version = expr ignored when using subcommands #324
Comments
I really regret the decision to generate |
I was going to suggest only setting it when explicitly referenced, but I haven't been following the changes since 0.2 closely enough to understand the background. |
You mean, generate |
That's a breaking change. For the memory: #217 |
My expectation would be that if I didn't explicitly use I believe that that is the behavior in structopt 0.2 which is what I was attempting to upgrade from; from my perspective 0.2 -> 0.3 is already a breaking change, so I have no problem with a fix being an additional breaking change--it would make it less of a breaking change for me :) |
FWIW, I'm also totally fine with not setting the default version at all, but that's because I prefer to show versions based off the commit information for executables. So long as overriding the version is not overly laborious, I don't have a strong opinion on what the default behavior is. |
The question here, how to detect if the It would be much easier to develop and support if they were separate traits, like (Not to mention that this would simplify the implementing code significantly). I'm looking forward to change it in |
That would be more complicated for the user. |
Actually, it was a longstanding bug in 0.2, which was fixed only recently. The bug in a nutshell - top level attributes (including the auto-generated |
What's complicated with separate traits? It would be like:
Pretty simple, huh? |
You'll be surprised by the bug reports that would generate such a change. |
Er, I'm not proposing to change |
Of course, just don't underestimate the simplicity of your interface, and don't forget that you are biased as a contributor. |
This sounds similar to #283 but manifests a little differently.
generates code along the lines of:
The workaround is to add something like:
on everthing for which the
StructOpt
derive is used.The text was updated successfully, but these errors were encountered: