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

Cannot compile 'wasm-bindgen-futures' due conditional dependency on target feature #136

Closed
TheNeikos opened this issue May 21, 2020 · 3 comments

Comments

@TheNeikos
Copy link

I am currently trying to build a crate that as one of its transitive dependencies wasm-bindgen-futures and from this code: https://github.com/rustwasm/wasm-bindgen/blob/master/crates/futures/Cargo.toml#L18 it generates the following code:

target = { target, features }: (target."feature" == "atomics");

This then errors with: attribute 'feature' missing.

It is similar to #37 but it uses target_feature here instead of just target

@bbigras
Copy link
Contributor

bbigras commented Jun 3, 2020

I have a similar problem (target = { target, features } line):

      "aes" = rec {
        crateName = "aes";
        version = "0.3.2";
        edition = "2015";
        sha256 = "1j90iwpax0y1dqq14i8y9xgpcnnlgnljwkxg3mhzrralwf7ivssl";
        authors = [
          "RustCrypto Developers"
        ];
        dependencies = [
          {
            name = "aes-soft";
            packageId = "aes-soft";
            target = { target, features }: (!((target."feature" == "aes") && (target."feature" == "sse2") && ((target."arch" == "x86_64") || (target."arch" == "x86"))));
          }

@sireliah
Copy link

Adding a feature = "" in defaultTarget is a hotfix that worked for me.

@kolloch
Copy link
Collaborator

kolloch commented Nov 28, 2020

Merged this #142

I hope it helps!

@kolloch kolloch closed this as completed Nov 28, 2020
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

Successfully merging a pull request may close this issue.

4 participants