{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/6183","repository_url":"https://api.github.com/repos/rust-lang/cargo","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/6183/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/6183/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/6183/events","html_url":"https://github.com/rust-lang/cargo/issues/6183","id":371352639,"node_id":"MDU6SXNzdWUzNzEzNTI2Mzk=","number":6183,"title":"Cargo doesn't fetch dev-dependencies when compiling tests for a sub crate in a workspace","user":{"login":"zacps","id":9827696,"node_id":"MDQ6VXNlcjk4Mjc2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/9827696?v=4","gravatar_id":"","url":"https://api.github.com/users/zacps","html_url":"https://github.com/zacps","followers_url":"https://api.github.com/users/zacps/followers","following_url":"https://api.github.com/users/zacps/following{/other_user}","gists_url":"https://api.github.com/users/zacps/gists{/gist_id}","starred_url":"https://api.github.com/users/zacps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zacps/subscriptions","organizations_url":"https://api.github.com/users/zacps/orgs","repos_url":"https://api.github.com/users/zacps/repos","events_url":"https://api.github.com/users/zacps/events{/privacy}","received_events_url":"https://api.github.com/users/zacps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-18T04:00:01Z","updated_at":"2018-10-18T14:17:10Z","closed_at":null,"author_association":"NONE","body":"<!-- Thanks for filing a 🐛 bug report 😄! -->\r\n\r\n**Problem**\r\n<!-- A clear and concise description of what the bug is. -->\r\n<!-- including what currently happens and what you expected to happen. -->\r\nIf a workspace has a subpackage which contains a test using an external crate like this:\r\n\r\n```rust\r\n#[cfg(test)]\r\nmod tests {\r\n    extern crate blah;\r\n\r\n    fn test_blah() {\r\n        blah::blah();\r\n    }\r\n}\r\n```\r\n\r\nAnd `blah` is declared in `dev-dependencies`:\r\n\r\n```rust\r\n[dev-dependencies]\r\nblah = \"*\"\r\n```\r\n\r\nThen running from the package will work:\r\n\r\n```\r\n[subpackage]$ cargo test\r\n```\r\n\r\nBut running from the parent will fail:\r\n\r\n```\r\n[parentpackage]$ cargo test -p subpackage\r\nerror: can't find crate blah\r\n```\r\n\r\n**Notes**\r\n\r\nOutput of `cargo version`:\r\n\r\n```\r\ncargo 1.31.0-nightly (5dbac9888 2018-10-08)\r\nrelease: 1.31.0\r\ncommit-hash: 5dbac98885199bbd7c0f189d7405b5523434d1e3\r\ncommit-date: 2018-10-08\r\n```\r\n\r\nOS: Windows 10\r\n\r\n<!-- Also, any additional context or information you feel may be relevant to the issue. -->\r\n<!-- (e.g rust version, OS platform/distribution/version, target toolchain(s), release channel.. -->\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/431026451","html_url":"https://github.com/rust-lang/cargo/issues/6183#issuecomment-431026451","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/6183","id":431026451,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTAyNjQ1MQ==","user":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T14:17:10Z","updated_at":"2018-10-18T14:17:10Z","author_association":"MEMBER","body":"Thanks for the report! Do you have a sample project which reproduces that we could poke around with? (having the full workspace configuration is convenient)"}}
{"actor":{"display_login":"alexcrichton"}}