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

target.'cfg(test)'.dependencies - unknown target test #43

Closed
andir opened this issue Nov 8, 2019 · 1 comment
Closed

target.'cfg(test)'.dependencies - unknown target test #43

andir opened this issue Nov 8, 2019 · 1 comment

Comments

@andir
Copy link
Collaborator

andir commented Nov 8, 2019

With the following in Cargo.toml

[target.'cfg(test)'.dependencies]
tracing = { version = "0.1.5", features = ["log"] }

https://github.com/tokio-rs/tokio/blob/5efe31f2ed3c797e8055306a05faa3d7e786e7b6/tokio-net/Cargo.toml#L102

Crate2 nix creates statement like target."test" but the that target isn't defined anywhere.

$ nix-build Cargo.nix -A rootCrate
error: attribute 'test' missing, at crate2nix-issues/cfg-test/Cargo.nix:89:22
(use '--show-trace' to show detailed location information)

I created a minimal test project at https://github.com/andir/crate2nix-issues/tree/d1e6ef9f7d1ea59a0286ee040015ba671511cb05/cfg-test

@kolloch
Copy link
Collaborator

kolloch commented Nov 10, 2019

Thank you very much for the example! I included it as a regression test.

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

No branches or pull requests

2 participants