{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/buildtools/pulls/comments/28845012","id":28845012,"diff_hunk":"@@ -20,18 +21,11 @@\n \n     <Exec Command=\"$(NugetRestoreCommand) &quot;$(TestRuntimePackageConfig)&quot;\" StandardOutputImportance=\"Low\" />\n \n-    <!-- DNU will emit a project.lock.json.  When multiple tests are building for the first time they may race on \n-         running this target and generating the lock.json.  This is causing IOExceptions in dnu for writing lock.json.\n-         We should really be handling these test dependencies in a different way (as a package themselves) but for now\n-         just restore the project.json from intermediate to avoid the race.  -->\n-    <Copy SourceFiles=\"$(TestRuntimeProjectJson)\" DestinationFolder=\"$(IntermediateOutputPath)\">\n-      <Output TaskParameter=\"CopiedFiles\" PropertyName=\"TempTestRuntimeProjectJson\"/>\n-    </Copy>\n-    <Exec Command=\"$(DnuRestoreCommand) &quot;$(TempTestRuntimeProjectJson)&quot;\" StandardOutputImportance=\"Low\" CustomErrorRegularExpression=\"^Unable to locate .*\" />\n+    <ExecWithMutex Command=\"$(DnuRestoreCommand) &quot;$(TestRuntimeProjectJson)&quot;\" MutexName=\"$(TestRuntimeProjectJson)\" StandardOutputImportance=\"Low\" CustomErrorRegularExpression=\"^Unable to locate .*\" />","path":"src/Microsoft.DotNet.Build.Tasks/Targets/publishtest.targets","position":20,"original_position":20,"commit_id":"c3f1438c822e032f5dd5f05a5da472015dbd9966","original_commit_id":"c3f1438c822e032f5dd5f05a5da472015dbd9966","user":{"login":"weshaggard","id":9010698,"avatar_url":"https://avatars.githubusercontent.com/u/9010698?v=3","gravatar_id":"","url":"https://api.github.com/users/weshaggard","html_url":"https://github.com/weshaggard","followers_url":"https://api.github.com/users/weshaggard/followers","following_url":"https://api.github.com/users/weshaggard/following{/other_user}","gists_url":"https://api.github.com/users/weshaggard/gists{/gist_id}","starred_url":"https://api.github.com/users/weshaggard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weshaggard/subscriptions","organizations_url":"https://api.github.com/users/weshaggard/orgs","repos_url":"https://api.github.com/users/weshaggard/repos","events_url":"https://api.github.com/users/weshaggard/events{/privacy}","received_events_url":"https://api.github.com/users/weshaggard/received_events","type":"User","site_admin":false},"body":"This seems like a pretty big hammer do you know if this actually causes any noticeable performance hits? I also assume this is temporary so it maybe worth a comment here about that.","created_at":"2015-04-22T05:15:45Z","updated_at":"2015-04-22T05:15:45Z","html_url":"https://github.com/dotnet/buildtools/pull/149#discussion_r28845012","pull_request_url":"https://api.github.com/repos/dotnet/buildtools/pulls/149","_links":{"self":{"href":"https://api.github.com/repos/dotnet/buildtools/pulls/comments/28845012"},"html":{"href":"https://github.com/dotnet/buildtools/pull/149#discussion_r28845012"},"pull_request":{"href":"https://api.github.com/repos/dotnet/buildtools/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/buildtools/pulls/149","id":33813759,"html_url":"https://github.com/dotnet/buildtools/pull/149","diff_url":"https://github.com/dotnet/buildtools/pull/149.diff","patch_url":"https://github.com/dotnet/buildtools/pull/149.patch","issue_url":"https://api.github.com/repos/dotnet/buildtools/issues/149","number":149,"state":"closed","locked":false,"title":"Prevent concurrent restore of same project.json","user":{"login":"ericstj","id":8918108,"avatar_url":"https://avatars.githubusercontent.com/u/8918108?v=3","gravatar_id":"","url":"https://api.github.com/users/ericstj","html_url":"https://github.com/ericstj","followers_url":"https://api.github.com/users/ericstj/followers","following_url":"https://api.github.com/users/ericstj/following{/other_user}","gists_url":"https://api.github.com/users/ericstj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericstj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericstj/subscriptions","organizations_url":"https://api.github.com/users/ericstj/orgs","repos_url":"https://api.github.com/users/ericstj/repos","events_url":"https://api.github.com/users/ericstj/events{/privacy}","received_events_url":"https://api.github.com/users/ericstj/received_events","type":"User","site_admin":false},"body":"DNX has an issue with concurrent restore: https://github.com/aspnet/dnx/issues/1682\r\n\r\nPreviously I would workaround by copying to intermediate, but this breaks in official build where intermediate is not under the scope of our nuget.config, so custom package sources are ignored.\r\n\r\nFix this instead by wrapping the call to dnu restore with a mutex unique to the project.json name.  We only need to do this for the test project.json because that is the only one we'll restore concurrently.","created_at":"2015-04-21T23:32:42Z","updated_at":"2015-04-22T05:15:45Z","closed_at":"2015-04-22T04:37:41Z","merged_at":"2015-04-22T04:37:41Z","merge_commit_sha":"976877dbe340020d37afacc32d90c7bfaa2397f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/buildtools/pulls/149/commits","review_comments_url":"https://api.github.com/repos/dotnet/buildtools/pulls/149/comments","review_comment_url":"https://api.github.com/repos/dotnet/buildtools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/buildtools/issues/149/comments","statuses_url":"https://api.github.com/repos/dotnet/buildtools/statuses/c3f1438c822e032f5dd5f05a5da472015dbd9966","head":{"label":"ericstj:testRestore","ref":"testRestore","sha":"c3f1438c822e032f5dd5f05a5da472015dbd9966","user":{"login":"ericstj","id":8918108,"avatar_url":"https://avatars.githubusercontent.com/u/8918108?v=3","gravatar_id":"","url":"https://api.github.com/users/ericstj","html_url":"https://github.com/ericstj","followers_url":"https://api.github.com/users/ericstj/followers","following_url":"https://api.github.com/users/ericstj/following{/other_user}","gists_url":"https://api.github.com/users/ericstj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericstj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericstj/subscriptions","organizations_url":"https://api.github.com/users/ericstj/orgs","repos_url":"https://api.github.com/users/ericstj/repos","events_url":"https://api.github.com/users/ericstj/events{/privacy}","received_events_url":"https://api.github.com/users/ericstj/received_events","type":"User","site_admin":false},"repo":{"id":32707044,"name":"buildtools","full_name":"ericstj/buildtools","owner":{"login":"ericstj","id":8918108,"avatar_url":"https://avatars.githubusercontent.com/u/8918108?v=3","gravatar_id":"","url":"https://api.github.com/users/ericstj","html_url":"https://github.com/ericstj","followers_url":"https://api.github.com/users/ericstj/followers","following_url":"https://api.github.com/users/ericstj/following{/other_user}","gists_url":"https://api.github.com/users/ericstj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericstj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericstj/subscriptions","organizations_url":"https://api.github.com/users/ericstj/orgs","repos_url":"https://api.github.com/users/ericstj/repos","events_url":"https://api.github.com/users/ericstj/events{/privacy}","received_events_url":"https://api.github.com/users/ericstj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ericstj/buildtools","description":"Build tools that are necessary for building the .NET Core projects","fork":true,"url":"https://api.github.com/repos/ericstj/buildtools","forks_url":"https://api.github.com/repos/ericstj/buildtools/forks","keys_url":"https://api.github.com/repos/ericstj/buildtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericstj/buildtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericstj/buildtools/teams","hooks_url":"https://api.github.com/repos/ericstj/buildtools/hooks","issue_events_url":"https://api.github.com/repos/ericstj/buildtools/issues/events{/number}","events_url":"https://api.github.com/repos/ericstj/buildtools/events","assignees_url":"https://api.github.com/repos/ericstj/buildtools/assignees{/user}","branches_url":"https://api.github.com/repos/ericstj/buildtools/branches{/branch}","tags_url":"https://api.github.com/repos/ericstj/buildtools/tags","blobs_url":"https://api.github.com/repos/ericstj/buildtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericstj/buildtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericstj/buildtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericstj/buildtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericstj/buildtools/statuses/{sha}","languages_url":"https://api.github.com/repos/ericstj/buildtools/languages","stargazers_url":"https://api.github.com/repos/ericstj/buildtools/stargazers","contributors_url":"https://api.github.com/repos/ericstj/buildtools/contributors","subscribers_url":"https://api.github.com/repos/ericstj/buildtools/subscribers","subscription_url":"https://api.github.com/repos/ericstj/buildtools/subscription","commits_url":"https://api.github.com/repos/ericstj/buildtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericstj/buildtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericstj/buildtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericstj/buildtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericstj/buildtools/contents/{+path}","compare_url":"https://api.github.com/repos/ericstj/buildtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericstj/buildtools/merges","archive_url":"https://api.github.com/repos/ericstj/buildtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericstj/buildtools/downloads","issues_url":"https://api.github.com/repos/ericstj/buildtools/issues{/number}","pulls_url":"https://api.github.com/repos/ericstj/buildtools/pulls{/number}","milestones_url":"https://api.github.com/repos/ericstj/buildtools/milestones{/number}","notifications_url":"https://api.github.com/repos/ericstj/buildtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericstj/buildtools/labels{/name}","releases_url":"https://api.github.com/repos/ericstj/buildtools/releases{/id}","created_at":"2015-03-23T02:32:50Z","updated_at":"2015-04-21T21:45:58Z","pushed_at":"2015-04-22T00:26:27Z","git_url":"git://github.com/ericstj/buildtools.git","ssh_url":"git@github.com:ericstj/buildtools.git","clone_url":"https://github.com/ericstj/buildtools.git","svn_url":"https://github.com/ericstj/buildtools","homepage":"","size":457,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"d7ee4f870e48b0fbda26a8e420e834ffba577bab","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295349,"name":"buildtools","full_name":"dotnet/buildtools","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/buildtools","description":"Build tools that are necessary for building the .NET Core projects","fork":false,"url":"https://api.github.com/repos/dotnet/buildtools","forks_url":"https://api.github.com/repos/dotnet/buildtools/forks","keys_url":"https://api.github.com/repos/dotnet/buildtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/buildtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/buildtools/teams","hooks_url":"https://api.github.com/repos/dotnet/buildtools/hooks","issue_events_url":"https://api.github.com/repos/dotnet/buildtools/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/buildtools/events","assignees_url":"https://api.github.com/repos/dotnet/buildtools/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/buildtools/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/buildtools/tags","blobs_url":"https://api.github.com/repos/dotnet/buildtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/buildtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/buildtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/buildtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/buildtools/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/buildtools/languages","stargazers_url":"https://api.github.com/repos/dotnet/buildtools/stargazers","contributors_url":"https://api.github.com/repos/dotnet/buildtools/contributors","subscribers_url":"https://api.github.com/repos/dotnet/buildtools/subscribers","subscription_url":"https://api.github.com/repos/dotnet/buildtools/subscription","commits_url":"https://api.github.com/repos/dotnet/buildtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/buildtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/buildtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/buildtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/buildtools/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/buildtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/buildtools/merges","archive_url":"https://api.github.com/repos/dotnet/buildtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/buildtools/downloads","issues_url":"https://api.github.com/repos/dotnet/buildtools/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/buildtools/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/buildtools/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/buildtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/buildtools/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/buildtools/releases{/id}","created_at":"2014-11-06T23:43:05Z","updated_at":"2015-04-22T04:41:18Z","pushed_at":"2015-04-22T04:37:41Z","git_url":"git://github.com/dotnet/buildtools.git","ssh_url":"git@github.com:dotnet/buildtools.git","clone_url":"https://github.com/dotnet/buildtools.git","svn_url":"https://github.com/dotnet/buildtools","homepage":"","size":2415,"stargazers_count":342,"watchers_count":342,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":5,"forks":129,"open_issues":5,"watchers":342,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/buildtools/pulls/149"},"html":{"href":"https://github.com/dotnet/buildtools/pull/149"},"issue":{"href":"https://api.github.com/repos/dotnet/buildtools/issues/149"},"comments":{"href":"https://api.github.com/repos/dotnet/buildtools/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/buildtools/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/buildtools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/buildtools/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/buildtools/statuses/c3f1438c822e032f5dd5f05a5da472015dbd9966"}}}}