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]: installing from source with cargo install cargo-shuttle interupted by a compilation error in crate shuttle-common. #947

Closed
1 task done
cidit opened this issue May 26, 2023 · 4 comments · Fixed by #961
Labels
T-Bug Something isn't working

Comments

@cidit
Copy link

cidit commented May 26, 2023

What happened?

Its all in the title. Im sorry in advance if this is the wrong place to file this bug report!

Version

0.17.0

Which operating systems are you seeing the problem on?

Linux

Which CPU architectures are you seeing the problem on?

x86_64

Relevant log output

Compiling shuttle-common v0.17.0
error[E0308]: mismatched types
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/shuttle-common-0.17.0/src/models/error.rs:27:43
   |
27 |             self.message.to_string().with(Color::Red)
   |                                      ---- ^^^^^^^^^^ expected enum `crossterm::style::Color`, found enum `comfy_table::Color`
   |                                      |
   |                                      arguments to this method are incorrect
   |
   = note: enum `comfy_table::Color` and enum `crossterm::style::Color` have similar names, but are actually distinct types
note: enum `comfy_table::Color` is defined in crate `crossterm`
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/crossterm-0.26.1/src/style/types/color.rs:28:1
   |
28 | pub enum Color {
   | ^^^^^^^^^^^^^^
note: enum `crossterm::style::Color` is defined in crate `crossterm`
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/crossterm-0.25.0/src/style/types/color.rs:28:1
   |
28 | pub enum Color {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `crossterm` are being used?
note: associated function defined here
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/crossterm-0.25.0/src/style/stylize.rs:78:8
   |
78 |     fn with(self, color: Color) -> Self::Styled {
   |        ^^^^

error[E0308]: mismatched types
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/shuttle-common-0.17.0/src/models/service.rs:45:27
   |
45 |                     .with(deployment.state.get_color()),
   |                      ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `crossterm::style::Color`, found enum `comfy_table::Color`
   |                      |
   |                      arguments to this method are incorrect
   |
   = note: enum `comfy_table::Color` and enum `crossterm::style::Color` have similar names, but are actually distinct types
note: enum `comfy_table::Color` is defined in crate `crossterm`
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/crossterm-0.26.1/src/style/types/color.rs:28:1
   |
28 | pub enum Color {
   | ^^^^^^^^^^^^^^
note: enum `crossterm::style::Color` is defined in crate `crossterm`
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/crossterm-0.25.0/src/style/types/color.rs:28:1
   |
28 | pub enum Color {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `crossterm` are being used?
note: associated function defined here
  --> /home/cid/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/crossterm-0.25.0/src/style/stylize.rs:78:8
   |
78 |     fn with(self, color: Color) -> Self::Styled {
   |        ^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `shuttle-common` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-shuttle v0.17.0`, intermediate artifacts can be found at `/tmp/cargo-installylP4W0`

Duplicate declaration

  • I have searched the issues and there are none like this.
@cidit cidit added the T-Bug Something isn't working label May 26, 2023
@tobiasmllr
Copy link

I get the same error on linux.

cargo --version
cargo 1.69.0 (6e9a83356 2023-04-12)

@jonaro00
Copy link
Member

One of Shuttle's dependencies introduced a breaking change (breaking semver it seems).
You can solve this by installing with cargo binstall as per the instructions, or
cargo install cargo-shuttle --locked to get an unbroken version.

@cidit
Copy link
Author

cidit commented May 26, 2023

i think i heard talk of binstall also being broken coincidentally 💀 i cant confirm, but the fix is the same if that's the case: cargo install --locked cargo-binstall

@joshua-mo-143
Copy link
Contributor

Hey all, it looks like this issue appears to be down to a dependency conflict. Hopefully this issue will get fixed shortly but for now, please refer to the above workaround. Thank you all for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants