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

Fails to compile with uuid feature #43

Closed
schmidmt opened this issue Jan 6, 2022 · 5 comments
Closed

Fails to compile with uuid feature #43

schmidmt opened this issue Jan 6, 2022 · 5 comments
Labels

Comments

@schmidmt
Copy link

schmidmt commented Jan 6, 2022

When compiling with

cargo 1.57.0 (b2e52d7ca 2021-10-21)
rustc 1.57.0 (f1edd0429 2021-11-29)

the following errors occur:

➜ cargo build --features uuid
  Compiling uuid v0.8.2
error[E0412]: cannot find type `Uuid` in this scope
  --> /Users/schmidmt/.cargo/registry/src/github.com-1ecc6299db9ec823/uuid-0.8.2/src/adapter/mod.rs:917:19
   |
917 |           impl From<Uuid> for $T {
   |                     ^^^^ not found in this scope
...
934 | / impl_adapter_traits! {
935 | |     Hyphenated<>,
936 | |     HyphenatedRef<'a>,
937 | |     Simple<>,
...   |
940 | |     UrnRef<'a>
941 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in the macro `impl_adapter_from` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Uuid` in this scope
  --> /Users/schmidmt/.cargo/registry/src/github.com-1ecc6299db9ec823/uuid-0.8.2/src/adapter/mod.rs:919:24
   |
919 |               fn from(f: Uuid) -> Self {
   |                          ^^^^ not found in this scope
...
934 | / impl_adapter_traits! {
935 | |     Hyphenated<>,
936 | |     HyphenatedRef<'a>,
937 | |     Simple<>,
...   |
940 | |     UrnRef<'a>
941 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in the macro `impl_adapter_from` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Uuid` in this scope
  --> /Users/schmidmt/.cargo/registry/src/github.com-1ecc6299db9ec823/uuid-0.8.2/src/adapter/mod.rs:925:27
   |
925 |           impl<$a> From<&$a Uuid> for $T<$a> {
   |                             ^^^^ not found in this scope
...
@dylanhart
Copy link
Owner

I'm unable to reproduce this failure on x86_64 Windows and Linux. This is also a build failure originating from the uuid package. Can you validate that uuid-0.8.2 builds for you in isolation?

@dylanhart
Copy link
Owner

git clone https://github.com/uuid-rs/uuid.git -b 0.8.2
cd uuid
cargo build

@schmidmt
Copy link
Author

schmidmt commented Jan 6, 2022

The uuid package seems to compile correctly by itself. As it does in a project; when replacing the uuid crate with ulid I encountered the error mentioned above.

uuid on  HEAD (b68733d) is 📦 v0.8.2 via 🦀 v1.57.0
➜ cargo build
   Compiling uuid v0.8.2 (/Users/schmidmt/code/uuid)
    Finished dev [unoptimized + debuginfo] target(s) in 1.35s

This is quite strange...

@schmidmt
Copy link
Author

schmidmt commented Jan 6, 2022

For completeness, I am on a Mac. I just tried it in the rust:1.57 docker image, and it worked just fine. It seems to be an issue with the Mac toolchain, I suppose. Anyway, the problem seems to be elsewhere. Thanks for looking into it.

@schmidmt
Copy link
Author

schmidmt commented Jan 6, 2022

For anyone who encountered this, I solved this by removing all caching files in .cargo, though don't delete your config files :).

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