Skip to content
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

Cargo environment variables doesn't trigger a rebuild on update #838

Closed
ishitatsuyuki opened this issue Feb 2, 2017 · 1 comment
Closed
Labels
A-docs Area: documentation, including docs.rs, readme, examples, etc... C-enhancement Category: Raise on the bar on expectations
Milestone

Comments

@ishitatsuyuki
Copy link

Rust Version

rustc 1.16.0-dev (0f8a29647 2017-01-28)

Disclaimer: homemade build

Affected Version of clap

2.20.1

Expected Behavior Summary

Changing version/description in Cargo.toml should trigger a rebuild with app_from_crate!() macro and others.

Actual Behavior Summary

Nothing happens.


A quick hack that can trick the compiler:

include_str!("../Cargo.toml");

This is not universal though, since this assumes the main source is src/main.rs.

The real solution would require hooking into the compiler (via plugin/proc-macro) and alter the filemap.
It's likely a rustc design fault, so we can also file an issue on them instead.

For the meanwhile, put a big warning in docs.

@kbknapp
Copy link
Member

kbknapp commented Feb 3, 2017

Thanks for mentioning this, I'll add it to the upcoming round of doc changes!

@kbknapp kbknapp added A-docs Area: documentation, including docs.rs, readme, examples, etc... D: easy C-enhancement Category: Raise on the bar on expectations labels Feb 3, 2017
@kbknapp kbknapp added this to the 2.20.3 milestone Feb 3, 2017
kbknapp added a commit that referenced this issue Feb 3, 2017
kbknapp added a commit that referenced this issue Feb 3, 2017
kbknapp added a commit that referenced this issue Feb 3, 2017
kbknapp added a commit that referenced this issue Feb 3, 2017
kbknapp added a commit that referenced this issue Feb 3, 2017
kbknapp added a commit that referenced this issue Feb 3, 2017
@kbknapp kbknapp closed this as completed in 92919f5 Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation, including docs.rs, readme, examples, etc... C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

2 participants