sonos / dinghy

Easier cross-compilation for phones and single boards computers
Other
367 stars 44 forks source link

Support building crates that use resolver 2 #133

Closed Maldron closed 3 years ago

Maldron commented 3 years ago

If a crate (or any of its dependencies) has opted in to resolver 2, it won't currently build with dinghy. The 2021 edition will make resolver 2 the default for new crates (https://github.com/rust-lang/cargo/issues/9048), so this will probably become a widespread issue over time.

To reproduce, create a new empty library like cargo new resolver_2_test --lib, then add resolver = "2" to resolver_2_test/Cargo.toml. Then run dinghy as normal with cargo dinghy -d rust_test_simulator test, and you'll get the following error:

[2021-07-27T20:59:01Z ERROR cargo_dinghy] failed to parse manifest at `/Users/.../resolver_2_test/Cargo.toml`

    Caused by:
        feature `resolver` is required

        this Cargo does not support nightly features, but if you
        switch to nightly channel you can add
        `cargo-features = ["resolver"]` to enable this feature
Maldron commented 3 years ago

Fixed in https://github.com/sonos/dinghy/pull/134. Thanks @kali!