-
-
Notifications
You must be signed in to change notification settings - Fork 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
add crate_authors! macro #447
Comments
Awesome idea! I'm ok with not using feature flags, so long as the minimal version of cargo for this macro is annotated in the documentation. Thanks 👍 |
Since the environment variable is new, we could provide two versions of macros: One is just using |
I thought about using option_env! instead but then you get something that will need to be deprecated or be awkward later on. Also to clarify technically it's newer then new, it hasn't been merged yet though I think it will be soon. I was thinking about adding a feature flag then dropping the flag after a year. |
@rtaycher I guess it can get awkward after a while. Once the pr is merged, can you amend the commit messages to follow the contribution guideline and make a pull request? |
So yeah let's us a feature flag until it's in stable Rust. Whether that's the |
I find it funny, it's exactly for this use case that I proposed that change on rust/cargo 😄 |
Adds a crate_authors! macro that fetches crate authors from a (recently added) cargo enviromental variable populated from the Cargo file. Like the crate_version macro. Closes clap-rs#447
feat(Authors Macro): adds a crate_authors macro Adds a crate_authors! macro that fetches crate authors from a (recently added) cargo enviromental variable populated from the Cargo file. Like the crate_version macro. Closes #447 Hopefully this fixed the previous problems.
feat(Authors Macro): adds a crate_authors macro Adds a crate_authors! macro that fetches crate authors from a (recently added) cargo enviromental variable populated from the Cargo file. Like the crate_version macro. Closes #447 Hopefully this fixed the previous problems.
Once rust-lang/cargo#2465 lands it would be useful to have a crate_authors! macro to complement the crate_version! macro (fetch authors from cargo).
It's a pretty small change.
master...rtaycher:add_authors_macro
But it won't work on old cargo binaries.
Should I put this behind feature flags(at first)?
The text was updated successfully, but these errors were encountered: