{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/127489953","pull_request_review_id":50084779,"id":127489953,"diff_hunk":"@@ -81,6 +81,16 @@\n     <ProjectAssetsFile Condition=\"'$(BuildingForLiveUnitTesting)' == 'true'\">$(LiveUnitTestingOriginalBaseIntermediateOutputPath)project.assets.json</ProjectAssetsFile>\n   </PropertyGroup>\n \n+  <!-- Utilize source linking whenever there is a valid git commit available. Won't be available during rebase, \n+       or build from zip for example -->\n+  <PropertyGroup Condition=\"'$(GitHeadShaRaw)' != '' AND '$(OS)' == 'Windows_NT' \">\n+    <SourceLinkCreate>true</SourceLinkCreate>\n+    <SourceLinkRootDirectory Condition=\"'$(SourceLinkRootDirectory)' == ''\">$(RepoRoot)</SourceLinkRootDirectory>\n+    <SourceLinkOriginUrl>https://github.com/dotnet/roslyn</SourceLinkOriginUrl>\n+    <SourceLinkUrl>https://raw.githubusercontent.com/dotnet/roslyn/$(GitHeadShaRaw)/*</SourceLinkUrl>\n+    <SourceLinkCommit>$(GitHeadShaRaw)</SourceLinkCommit>","path":"build/Targets/Settings.props","position":11,"original_position":11,"commit_id":"d58cb1099efb5b10988183c9914390a8e7b74ac7","original_commit_id":"d58cb1099efb5b10988183c9914390a8e7b74ac7","user":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars4.githubusercontent.com/u/146967?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"body":"@ctaggart, @tmat \r\n\r\n> If SourceLinkUrl and the SourceLinkCommit are not set, they are figured out by running git commands.\r\n\r\nI noticed that when looking at several of your samples / implementation. The reason for still using the explicit values is build performance and correctness.\r\n\r\n- Performance: Letting SourceLink determine the values causes 6 processes to be spawned per project built: the 3 that SourceLink will spawn to calculate root, sha and URL. Each of these is wrapped in an `cmd.exe` process that comes with using `<Exec>`. There are ~170 projects in Roslyn so that would mean about ~1,000 processes spawned during a build. That causes a 15-20% increase in build time for us as compared with just using the values we already know.\r\n- Correctness: The calculation of `SourceLinkUrl` can produce different values depending on how the repo was cloned. For instance on my box it uses my fork vs. the official repo. Prefer to be explicit here, in particular for official builds, and make sure we are setting up the correct server info. We've gotten burned in the past making assumptions about how official builds are cloned. \r\n\r\nFor 99% of the projects out there I think the approach SourceLink takes will work great. Roslyn is just a huge project that needs to tolerate being built in a number of different ways with different environments. \r\n\r\n> SourceLinkOriginUrl isn't needed because you are setting SourceLinkUrl\r\n\r\nPlan is to eventually use SourceLinkUrl. Presently using SourceLinkUrl will cause SourceLink to log a number of high priority messages to the build output. Using SourceLinkOriginUrl temporarily to avoid that.\r\n\r\nI still owe you a PR to get the priority of those messages changed. Haven't forgotten about it, just gotten bogged down in a number of issues around shipping VS2017 Update 3. 😦 \r\n\r\n> Looks great!\r\n\r\nThanks for taking the time to look at this 😄 \r\n\r\n","created_at":"2017-07-14T15:59:39Z","updated_at":"2017-07-14T15:59:39Z","html_url":"https://github.com/dotnet/roslyn/pull/20719#discussion_r127489953","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20719","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/127489953"},"html":{"href":"https://github.com/dotnet/roslyn/pull/20719#discussion_r127489953"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20719"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/20719","id":129500219,"html_url":"https://github.com/dotnet/roslyn/pull/20719","diff_url":"https://github.com/dotnet/roslyn/pull/20719.diff","patch_url":"https://github.com/dotnet/roslyn/pull/20719.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/20719","number":20719,"state":"open","locked":false,"title":"Use source linking in our PDB files","user":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars4.githubusercontent.com/u/146967?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"body":"This makes a couple of changes to how PDB source server information\r\nworks in our repo:\r\n\r\n- Uses source link vs. GitLink\r\n- Enables for all built DLLs vs. just shipping ones.\r\nonly\r\n- Enables for virtually all builds vs. just official builds.\r\n\r\nThe main item to discuss is the difference between source link and\r\ngitlink:\r\n\r\n- Gitlink is a post processing step on our PDB which replaces document\r\npaths with raw URLs. This is understood by both VS and windbg.\r\n- Source link inserts a JSON file to the PDB during normal compilation\r\nwhich describes how to map files in the PDB to Github URLs. This is\r\nunderstood by VS only (windbg support pending). This is a format\r\nspecifically supported by our compilation pipeline.\r\n\r\n","created_at":"2017-07-07T22:37:41Z","updated_at":"2017-07-14T15:59:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e229e8878fd9722db97415eedbdbb9bf7e9dd420","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jasonmalinowski","id":201340,"avatar_url":"https://avatars7.githubusercontent.com/u/201340?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonmalinowski","html_url":"https://github.com/jasonmalinowski","followers_url":"https://api.github.com/users/jasonmalinowski/followers","following_url":"https://api.github.com/users/jasonmalinowski/following{/other_user}","gists_url":"https://api.github.com/users/jasonmalinowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmalinowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmalinowski/subscriptions","organizations_url":"https://api.github.com/users/jasonmalinowski/orgs","repos_url":"https://api.github.com/users/jasonmalinowski/repos","events_url":"https://api.github.com/users/jasonmalinowski/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmalinowski/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20719/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/20719/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/20719/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/d58cb1099efb5b10988183c9914390a8e7b74ac7","head":{"label":"jaredpar:fix-link","ref":"fix-link","sha":"d58cb1099efb5b10988183c9914390a8e7b74ac7","user":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars4.githubusercontent.com/u/146967?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"repo":{"id":29310774,"name":"roslyn","full_name":"jaredpar/roslyn","owner":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars4.githubusercontent.com/u/146967?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaredpar/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/jaredpar/roslyn","forks_url":"https://api.github.com/repos/jaredpar/roslyn/forks","keys_url":"https://api.github.com/repos/jaredpar/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaredpar/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaredpar/roslyn/teams","hooks_url":"https://api.github.com/repos/jaredpar/roslyn/hooks","issue_events_url":"https://api.github.com/repos/jaredpar/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/jaredpar/roslyn/events","assignees_url":"https://api.github.com/repos/jaredpar/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/jaredpar/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/jaredpar/roslyn/tags","blobs_url":"https://api.github.com/repos/jaredpar/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaredpar/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaredpar/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaredpar/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaredpar/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/jaredpar/roslyn/languages","stargazers_url":"https://api.github.com/repos/jaredpar/roslyn/stargazers","contributors_url":"https://api.github.com/repos/jaredpar/roslyn/contributors","subscribers_url":"https://api.github.com/repos/jaredpar/roslyn/subscribers","subscription_url":"https://api.github.com/repos/jaredpar/roslyn/subscription","commits_url":"https://api.github.com/repos/jaredpar/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaredpar/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaredpar/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaredpar/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jaredpar/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/jaredpar/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaredpar/roslyn/merges","archive_url":"https://api.github.com/repos/jaredpar/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaredpar/roslyn/downloads","issues_url":"https://api.github.com/repos/jaredpar/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/jaredpar/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/jaredpar/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/jaredpar/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaredpar/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/jaredpar/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/jaredpar/roslyn/deployments","created_at":"2015-01-15T18:10:36Z","updated_at":"2016-07-01T18:08:38Z","pushed_at":"2017-07-13T17:31:04Z","git_url":"git://github.com/jaredpar/roslyn.git","ssh_url":"git@github.com:jaredpar/roslyn.git","clone_url":"https://github.com/jaredpar/roslyn.git","svn_url":"https://github.com/jaredpar/roslyn","homepage":"","size":222689,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"cd5e0a0f6abce74350692dff203bdce5f915094f","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars4.githubusercontent.com/u/9141961?v=4","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":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars4.githubusercontent.com/u/9141961?v=4","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/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2017-07-14T07:07:59Z","pushed_at":"2017-07-14T15:48:17Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":226440,"stargazers_count":7765,"watchers_count":7765,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1903,"mirror_url":null,"open_issues_count":3780,"forks":1903,"open_issues":3780,"watchers":7765,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20719"},"html":{"href":"https://github.com/dotnet/roslyn/pull/20719"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/20719"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/20719/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20719/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/20719/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/d58cb1099efb5b10988183c9914390a8e7b74ac7"}}}}
{"actor":{"display_login":"jaredpar"}}