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 after updating to 5.0.0 #74

Closed
rushsteve1 opened this issue Jul 8, 2019 · 7 comments · Fixed by #75
Closed

Error after updating to 5.0.0 #74

rushsteve1 opened this issue Jul 8, 2019 · 7 comments · Fixed by #75
Labels

Comments

@rushsteve1
Copy link

After updating to verision 5.0.0 I get the following error, in multiple different codebases

error[E0463]: can't find crate for `rust_embed_utils`
  --> src/main.rs:59:10
   |
59 | #[derive(RustEmbed)]
   |          ^^^^^^^^^ can't find crate

The error is fixed by adding the following to Cargo.toml so it seems like something is missing a dependency.

rust-embed-utils = "5.0.0"

rustc 1.36.0 (a53f9df32 2019-07-03)
cargo 1.36.0 (c4fcfb725 2019-05-15)

@AzureMarker
Copy link
Collaborator

@pyros2097 I also see this on my project. We should probably re-export the utils crate in the main crate, then use it that way.

@AzureMarker AzureMarker added the bug label Jul 9, 2019
@AzureMarker
Copy link
Collaborator

However, surprisingly my Dependabot PR didn't fail the build? pi-hole/api#190

@rushsteve1
Copy link
Author

rushsteve1 commented Jul 9, 2019

My Dependabot PR did fail with both 5.0.0 and 5.0.1 with the exact same error as above.

@pyrossh
Copy link
Owner

pyrossh commented Jul 9, 2019

I wonder how the tests are passing then. This is such a weird case. I almost thought I published the crate without adding the rust_embed_utils as a dependency

@pyrossh
Copy link
Owner

pyrossh commented Jul 9, 2019

I'm lost with this one. I tried adding it to the lib.rs or rust-embed and still no luck. the release builds are working though. Don't know why just the debug builds are breaking.

@rushsteve1
Copy link
Author

Here is an isolated example that you can get to compile in some ways.
embedtest.zip

@AzureMarker
Copy link
Collaborator

Ah, that's probably the difference. My CI compiles in release mode, whereas @rushsteve1's CI probably compiles it in debug mode at some point.

AzureMarker added a commit that referenced this issue Jul 10, 2019
The utils crate is re-exported from the main crate for use in debug
builds.

Debug builds are compiled by the macro to use certain functions from the
utils crate. This is different than in release mode, where the macro
itself uses the functions and does not require them at runtime. When the
debug code tries to import the utils crate, it fails because it is not
an explicit dependency in Cargo.toml.

Fixes #74

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
pyrossh pushed a commit that referenced this issue Aug 24, 2021
The utils crate is re-exported from the main crate for use in debug
builds.

Debug builds are compiled by the macro to use certain functions from the
utils crate. This is different than in release mode, where the macro
itself uses the functions and does not require them at runtime. When the
debug code tries to import the utils crate, it fails because it is not
an explicit dependency in Cargo.toml.

Fixes #74

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
pyrossh pushed a commit that referenced this issue Aug 24, 2021
The utils crate is re-exported from the main crate for use in debug
builds.

Debug builds are compiled by the macro to use certain functions from the
utils crate. This is different than in release mode, where the macro
itself uses the functions and does not require them at runtime. When the
debug code tries to import the utils crate, it fails because it is not
an explicit dependency in Cargo.toml.

Fixes #74

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants