{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/5923","repository_url":"https://api.github.com/repos/rust-lang/cargo","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/5923/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/5923/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/5923/events","html_url":"https://github.com/rust-lang/cargo/issues/5923","id":352775480,"node_id":"MDU6SXNzdWUzNTI3NzU0ODA=","number":5923,"title":"Cargo varies between absolute/relative path passing vendor dir to rustc","user":{"login":"nipunn1313","id":1300387,"node_id":"MDQ6VXNlcjEzMDAzODc=","avatar_url":"https://avatars0.githubusercontent.com/u/1300387?v=4","gravatar_id":"","url":"https://api.github.com/users/nipunn1313","html_url":"https://github.com/nipunn1313","followers_url":"https://api.github.com/users/nipunn1313/followers","following_url":"https://api.github.com/users/nipunn1313/following{/other_user}","gists_url":"https://api.github.com/users/nipunn1313/gists{/gist_id}","starred_url":"https://api.github.com/users/nipunn1313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipunn1313/subscriptions","organizations_url":"https://api.github.com/users/nipunn1313/orgs","repos_url":"https://api.github.com/users/nipunn1313/repos","events_url":"https://api.github.com/users/nipunn1313/events{/privacy}","received_events_url":"https://api.github.com/users/nipunn1313/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-22T02:13:17Z","updated_at":"2018-08-22T02:13:17Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Here's the setup with two workspaces\r\n\r\n```\r\n.cargo\r\n   config\r\nw1/\r\n   Cargo.toml\r\n   vendor/\r\nw2/\r\n   Cargo.toml\r\n```\r\n\r\nThe .cargo/config points to\r\n```\r\n[source.vendored-sources]\r\ndirectory = \"./w1/vendor\"\r\n```\r\n\r\nWhen compiling something in w1, the command line might look like this:\r\n```\r\nrustc --crate-name byteorder vendor/byteorder-1.1.0/src/lib.rs\r\n```\r\n\r\nWhen compiling something in w2 the command line might look like this\r\n```\r\nrustc --crate-name byteorder /Users/nipunn/src/client/rust/vendor/byteorder-1.1.0/src/lib.rs\r\n```\r\n\r\nGiven that I share a CARGO_HOME across these two, and AFAICT, the cargo dep caching is based on rustc command line, if I alternate between compiling these two, it kicks off full recompiles.\r\n\r\nIf I move the `vendor` directory up to root, they both use absolute paths, and deps are cached across the two projects.\r\n\r\nProposed solution: cargo should always pass an absolute path to the vendor directory to rustc to work around this issue."}}
{"actor":{"display_login":"nipunn1313"}}