Skip to content

Features don't interact well with workspace crates #82

@iliekturtles

Description

@iliekturtles

See https://internals.rust-lang.org/t/help-us-test-the-breaking-bug-fix-to-cargo-features/7317 and rust-lang/cargo#5364. Also see the current .travis.yml where cargo test is run once for uom and once for feature_check.

Currently if you use cargo --test --all workspace crates are compiled with their default features (--features does not affect them) and link against the root package that is built with the specified features including dev-dependencies. If you use cargo test --manifest-path ... to manually run test for a workspace crate that references the root package then the root package is recompiled without dev-dependencies.

Ideally the uom CI build scripts should run both uom and feature_check tests and only compile uom once.

A possible short term fix is to have feature_check use the same feature set in the cargo build invocation so those build artifacts can be reused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions