-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Easily configurable license information #1768
Comments
Sounds good to me. @pksunkara @Dylan-DPC @TeXitoi what do you think? |
This is more similar to |
@Dantali0n thanks for the request. In this case it is better we make it a separate crate and see how it goes and then later merge it into clap if needed. Would you like to volunteer to write it? (we can mentor). Else will try myself or get someone to write it |
Hi, In terms of experience I don't think I am there yet as I am written my very first rust program atm. Currently I am still struggling with a lot of construct in rust, in addition, I tend not to have a lot of free time. Therefor, I think it is better if someone else tries to implement this, assuming someone has time and feels motivated to do so ofcourse. |
I did a bit of research on the UX of displaying the license. There are mainly 2 options: A separate
|
Do clap users need to list all of the legally relevant licenses and notices or just the license and attribution for their own program, leaving the rest to another file like with cargo-about? |
Idk, I'm not a lawyer. |
This reverts commit 6898fbd. PR clap-rs#2144 added the `license` field but no consumer has been added since the (like Issue clap-rs#1768). Since this is not ready yet, I am pulling it from the 3.0 release. So far, our main route for pulling a feature from the release has been to put it behind a `unstable-*` feature flag and to create a stablization tracking issue. I chose to instead remove the feature because a write-only field with no effect does not provide values for people to use in as an early access and so doesn't outweight the cost of the extra documentation noise and code noise it creates. Additionally, keeping an `unstable-` feature around when it has such an unknown path (and time table) to stalbization feels like it violates YAGNI. I'm uncertain how much of this feature we can implement and not create a legal trap for users because the crate's license is insufficient for the final artifact's license. I feel our stabliazation process sshould be about iteration and collecting user feedback which this doesn't line up with. When someone is ready to tackle clap-rs#1768, it will be easy to revert this commit and pick up the work again. Fixes clap-rs#3001
Describe your use case
Some types of software licenses, in particular GPL and friends, require licensing information to be displayed by the program upon request. Naturally this can already be configured with clap by creating a flag similar to -h/--help, however, I think this can be improved
Describe the solution you'd like
A more seamlessly integrated solution similar to
.author()
would improve this. Thelicense()
function could take sufficient arguments to automatically generate the licensing excerpt. for instance:.license(gplv3, 'MyNiceCompany.inc')
.Calling the program with --license could generate the following:
The text was updated successfully, but these errors were encountered: