{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/27594","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/27594/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/27594/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/27594/events","html_url":"https://github.com/rust-lang/rust/issues/27594","id":99776715,"number":27594,"title":"False negative comparing targets with equivalent paths","user":{"login":"JustAPerson","id":789308,"avatar_url":"https://avatars.githubusercontent.com/u/789308?v=3","gravatar_id":"","url":"https://api.github.com/users/JustAPerson","html_url":"https://github.com/JustAPerson","followers_url":"https://api.github.com/users/JustAPerson/followers","following_url":"https://api.github.com/users/JustAPerson/following{/other_user}","gists_url":"https://api.github.com/users/JustAPerson/gists{/gist_id}","starred_url":"https://api.github.com/users/JustAPerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustAPerson/subscriptions","organizations_url":"https://api.github.com/users/JustAPerson/orgs","repos_url":"https://api.github.com/users/JustAPerson/repos","events_url":"https://api.github.com/users/JustAPerson/events{/privacy}","received_events_url":"https://api.github.com/users/JustAPerson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-08T06:00:24Z","updated_at":"2015-08-08T14:50:45Z","closed_at":"2015-08-08T14:50:45Z","body":"Imagine a directory structure such as:\r\n\r\n```\r\n├── main.rs\r\n├── target.json\r\n├── libthing/\r\n│   ├── lib.rs\r\n```\r\n\r\nWhere `main.rs` depends on the separate crate `thing`\r\n\r\n```\r\ncd libthing/ && rustc lib.rs --target ../target.json\r\nrustc main.rs --target target.json --extern  thing=libthing/libthing.rlib\r\n```\r\nYou'll get an error that looks like this:\r\n```\r\nmain.rs:1  error: couldn't find crate `thing` with expected target triple target.json\r\nmain.rs:1  extern crate thing;\r\n```\r\n\r\nwhen compiling `main.rs`, rustc expects `--target ../target.json` instead of the equivalent path in the correct working directory.\r\n\r\n**tl;dr** It seems only the exact argument of `--target` is stored in the .rlib instead of the actual contents of the json file. "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/128988032","html_url":"https://github.com/rust-lang/rust/issues/27594#issuecomment-128988032","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/27594","id":128988032,"user":{"login":"JustAPerson","id":789308,"avatar_url":"https://avatars.githubusercontent.com/u/789308?v=3","gravatar_id":"","url":"https://api.github.com/users/JustAPerson","html_url":"https://github.com/JustAPerson","followers_url":"https://api.github.com/users/JustAPerson/followers","following_url":"https://api.github.com/users/JustAPerson/following{/other_user}","gists_url":"https://api.github.com/users/JustAPerson/gists{/gist_id}","starred_url":"https://api.github.com/users/JustAPerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustAPerson/subscriptions","organizations_url":"https://api.github.com/users/JustAPerson/orgs","repos_url":"https://api.github.com/users/JustAPerson/repos","events_url":"https://api.github.com/users/JustAPerson/events{/privacy}","received_events_url":"https://api.github.com/users/JustAPerson/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T14:50:45Z","updated_at":"2015-08-08T14:50:45Z","body":"Seems so. I'll close in favor of that issue."}}