Closed
Description
Problem
Adding a workspace member from a github repository as a dependency via cargo add
specifying existing features triggers an issue
Steps
- cargo add --git https://github.com/zama-ai/tfhe-rs.git tfhe --features=x86_64-unix
output:
Updating git repository `https://github.com/zama-ai/tfhe-rs.git`
Adding tfhe (git) to dependencies.
error: unrecognized feature for crate tfhe: x86_64-unix
no features available for crate tfhe
As one can see here the feature does exist in the tfhe workspace member Cargo.toml:
Possible Solution(s)
Unsure, I don't know the cargo code base, but my guess would be to parse the workspace member Cargo.toml to get some metadata/information about the crate
Notes
this is probably an edge case but can prove interesting for automated workflows that may be doing some automatic api breaks/checks by adding a work in progress version of a project to a test/regression project and run tests from that project
Version
cargo 1.76.0-nightly (9b13310ca 2023-11-24)
release: 1.76.0-nightly
commit-hash: 9b13310ca596020a737aaa47daa4ed9ff8898a2f
commit-date: 2023-11-24
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u 30 May 2023
os: Ubuntu 22.04 (jammy) [64-bit]