{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/354","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/354/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/354/events","html_url":"https://github.com/rust-lang/cargo/issues/354","id":39877995,"number":354,"title":"Concurrent usage of cargo will generally result in badness","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","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},"labels":[{"url":"https://api.github.com/repos/rust-lang/cargo/labels/I-wrong","name":"I-wrong","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2014-08-09T04:24:07Z","updated_at":"2015-06-30T20:58:14Z","closed_at":null,"body":"Cargo does a number of unsynchronized and racy operations that lead to lots of badness if they happen concurrently. This includes, but is not limited to, management of `target/`, checkouts into `~/.cargo/git/`, and anything having to do with concurrent compilations.\r\n\r\nThe only real reasonable solution I can think of to this is the same as the \"big hammer\" solution which is to just \"add a lock to everything\". Ideally we would separately lock `~/.cargo` and the local directory, but they should both in general be locked when performing any action."},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/117340155","html_url":"https://github.com/rust-lang/cargo/issues/354#issuecomment-117340155","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/354","id":117340155,"user":{"login":"colin-kiegel","id":7691186,"avatar_url":"https://avatars.githubusercontent.com/u/7691186?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-kiegel","html_url":"https://github.com/colin-kiegel","followers_url":"https://api.github.com/users/colin-kiegel/followers","following_url":"https://api.github.com/users/colin-kiegel/following{/other_user}","gists_url":"https://api.github.com/users/colin-kiegel/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-kiegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-kiegel/subscriptions","organizations_url":"https://api.github.com/users/colin-kiegel/orgs","repos_url":"https://api.github.com/users/colin-kiegel/repos","events_url":"https://api.github.com/users/colin-kiegel/events{/privacy}","received_events_url":"https://api.github.com/users/colin-kiegel/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T20:58:14Z","updated_at":"2015-06-30T20:58:14Z","body":"Another use case seems to be the atom editor with both 'linter-rust' (which runs cargo on file saves) and a 'build' plugin (which I like to set to save all modified files just before invoking cargo, too). This leads to random errors. It would be nice, if the cargo locking mechanism would 'wait' for a free lock (or at least could be set to wait with an additional flag). https://github.com/AtomLinter/linter-rust/issues/15"}}