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

[BUG] clap-related build error #224

Closed
sourcefrog opened this issue Aug 18, 2021 · 7 comments
Closed

[BUG] clap-related build error #224

sourcefrog opened this issue Aug 18, 2021 · 7 comments
Assignees
Labels

Comments

@sourcefrog
Copy link
Contributor

On Debian with rustc 1.54.0 (a178d0322 2021-07-26) building eb8d5c9

I get some build failures:

nice cargo install --path ~/src/pueue

....

   Compiling pueue v1.0.0-rc.4 (/home/mbp/src/pueue)
error[E0277]: the trait bound `cli::Shell: ArgEnum` is not satisfied
   --> client/cli.rs:383:16
    |
383 |         shell: Shell,
    |                ^^^^^ the trait `ArgEnum` is not implemented for `cli::Shell`
    |
    = note: required by `clap::ArgEnum::from_str`

error[E0277]: the trait bound `cli::Shell: ArgEnum` is not satisfied
   --> client/cli.rs:383:16
    |
383 |         shell: Shell,
    |                ^^^^^ the trait `ArgEnum` is not implemented for `cli::Shell`
    |
    = note: required by `VARIANTS`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: could not compile `pueue`

I don't get this when just building the tree with cargo build or cargo check so I suspect some difference in how dependency versions are being resolved...

@Nukesor
Copy link
Owner

Nukesor commented Aug 18, 2021

Daaaamn.

Everything looked perfectly fine and I decided to just release v1.0 before checking my issues again.
What a timing :D

I'm investigating the issue

@Nukesor
Copy link
Owner

Nukesor commented Aug 18, 2021

Ok. This isn't an issue with Pueue. The current Cargo.lock works perfectly fine.
It's rather an issue on how cargo install --path works.

rust-lang/cargo#6983

It ignores the lockfile. You have to explicitely add --locked for everything to be identical to the current release/commit.

@Nukesor
Copy link
Owner

Nukesor commented Aug 18, 2021

Clap just released a new version 3.0.0-beta.4, which introduces some breaking changes.
Thats why it's failing without the --locked parameter.

Beta branches seem to be handled in a similar way as patches. They just get auto-updated, even though an exact version is specified.

I'm going to close this issue, once the readme has been adjusted :)

@Nukesor
Copy link
Owner

Nukesor commented Aug 18, 2021

Readme has been adjusted!

@sourcefrog
Copy link
Contributor Author

OK I can confirm --locked fixes it.

Most crates don't need this so I wonder how many users will think to try it or look at the readme. Maybe Pueue should just be updated for the Clap change? (Also it goes to show how hard semver is in practice.)

@Nukesor
Copy link
Owner

Nukesor commented Aug 19, 2021

I already pushed a fix to master, but didn't publish a new release yet.

I guess, I'll release the patch tomorrow or saturday. I got a lot to do right now and I want to take a closer look at the changes in the new clap release.

@sourcefrog
Copy link
Contributor Author

Thanks - I didn't want to put any pressure on you to release it today, just wanted to make sure you knew, because it sounded from #224 (comment) like you'd only changed the readme.

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

No branches or pull requests

2 participants