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

Error messages refer to structopt 3.0 #241

Closed
dtolnay opened this issue Aug 30, 2019 · 3 comments · Fixed by #244
Closed

Error messages refer to structopt 3.0 #241

dtolnay opened this issue Aug 30, 2019 · 3 comments · Fixed by #244

Comments

@dtolnay
Copy link

dtolnay commented Aug 30, 2019

span_error!(lit.span(), "`#[structopt({} = \"\") is deprecated in structopt 3.0, now it's default behavior", s);

"`#[structopt(raw(...))` attributes are deprecated in structopt 3.0, only `raw(true)` and `raw(false)` are allowed")

"#[structopt(version)] is invalid attribute, structopt 3.0 inherits version from Cargo.toml by default, no attribute needed")

These errors are confusing because structopt is currently on version 0.3.

@CreepySkeleton
Copy link
Collaborator

CreepySkeleton commented Aug 30, 2019

This messages are intentional - they are meant to help people move from 0.2 to 0.3. For example, let's take raw attrs are deprecated message - in 0.2 there were magical raw attributes, they are gone in 0.3 but a user could accidentally try to use it just because they used to. We emit explicit error that explains the reasoning instead of generating Arg::raw method call with wrong arguments. The story is similar for other messages.

Any propositions on smoothing migrating experience are appreciated.

@dtolnay
Copy link
Author

dtolnay commented Aug 30, 2019

That's fine, but the error messages should say 0.3, not 3.0.

@CreepySkeleton
Copy link
Collaborator

Dammit. I knew I missed something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants