Skip to content

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

Description

@mortie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions