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

Compilation issues with tracing - attribute 'feature' missing #37

Closed
evanjs opened this issue Oct 17, 2019 · 0 comments · Fixed by #50
Closed

Compilation issues with tracing - attribute 'feature' missing #37

evanjs opened this issue Oct 17, 2019 · 0 comments · Fixed by #50

Comments

@evanjs
Copy link

evanjs commented Oct 17, 2019

I remember seeing something like this before with Carnix, though I'm not sure this is the same thing.

Generated a Cargo.nix and tried to build, but it fails with attribute 'feature' missing, which resolves to the spin crate dependency for tracing.

    "tracing 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)"
      = rec {
        crateName = "tracing";
        version = "0.1.9";
        edition = "2018";
        sha256 = "003dkgx7agd5g5hdmwayi927hzzr8gk0ghh83n4xg83k0x0wcv61";
        authors = [
          "Tokio Contributors <team@tokio.rs>"
        ];
        dependencies = {
          "cfg-if" = "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)";
          "log" = {
            packageId = "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)";
            optional = true;
          };
          "spin" = {
            packageId = "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)";
            target = (!(target."feature" == "std"));
          };
          "tracing-attributes" = "tracing-attributes 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)";
          "tracing-core" = {
            packageId = "tracing-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)";
            usesDefaultFeatures = false;
          };
        };
        features = {
          "default" = [ "std" ];
          "log-always" = [ "log" ];
          "std" = [ "tracing-core/std" ];
        };
        resolvedDefaultFeatures = [ "default" "log" "std" ];
      };

This is the line in particular that it reports:

target = (!(target."feature" == "std"));

nix-info -m

  • system: "x86_64-linux"
  • host os: Linux 5.3.6, NixOS, 19.09.840.8bf142e001b (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3
  • channels(root): "nixos-19.09.840.8bf142e001b, nixos-stable-19.09.789.7952807791d, nixos-unstable-20.03pre196586.b943338ea58, nixos-unstable-small-20.03pre196834.33366cce147, nixpkgs-unstable-20.03pre196811.7818f30cc4b"
  • channels(evanjs): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

crate2nix version: crate2nix 0.6.0-alpha.0

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.

1 participant