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

cargo bitbake doesn't work for packages which depend on env_logger... #79

Open
mortie opened this issue Sep 14, 2024 · 0 comments
Open

Comments

@mortie
Copy link

mortie commented Sep 14, 2024

Running cargo bitbake in a project which depends on env_logger (at least version 0.11.5) produces this error:

error: failed to select a version for `env_logger`.
    ... required by package `example-project v0.1.0 (/Users/martin/example-project)`
versions that meet the requirements `^0.11.5` are: 0.11.5

the package `example-project` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
 It has an optional dependency with that name, but but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


failed to select a version for `env_logger` which could resolve this conflict
Here are full repro steps
pro ~ $ mkdir example-project
pro ~ $ cd example-project
pro ~/example-project $ cargo init
     Created binary (application) package
pro ~/example-project main $ cargo add env_logger
    Updating crates.io index
      Adding env_logger v0.11.5 to dependencies.
             Features:
             + auto-color
             + color
             + humantime
             + regex
             - unstable-kv
    Updating crates.io index
pro ~/example-project main $ cargo build
   Compiling memchr v2.7.4
   Compiling regex-syntax v0.8.4
   Compiling utf8parse v0.2.2
   Compiling log v0.4.22
   Compiling is_terminal_polyfill v1.70.1
   Compiling anstyle-query v1.1.1
   Compiling anstyle v1.0.8
   Compiling colorchoice v1.0.2
   Compiling humantime v2.1.0
   Compiling anstyle-parse v0.2.5
   Compiling anstream v0.6.15
   Compiling aho-corasick v1.1.3
   Compiling regex-automata v0.4.7
   Compiling regex v1.10.6
   Compiling env_filter v0.1.2
   Compiling env_logger v0.11.5
   Compiling example-project v0.1.0 (/Users/martin/example-project)
    Finished dev [unoptimized + debuginfo] target(s) in 2.32s
pro ~/example-project main $ ./target/debug/example-project
Hello, world!
pro ~/example-project main $ cargo bitbake
error: failed to select a version for `env_logger`.
    ... required by package `example-project v0.1.0 (/Users/martin/example-project)`
versions that meet the requirements `^0.11.5` are: 0.11.5

the package `example-project` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
 It has an optional dependency with that name, but but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


failed to select a version for `env_logger` which could resolve this conflict
TaborKelly added a commit to TaborKelly/cargo-bitbake that referenced this issue Oct 18, 2024
This specifies cargo = ">=0.82.0" in Cargo.toml but actually resolves to
0.83.0 in Cargo.lock.
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

No branches or pull requests

1 participant