Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to GitLink 3.0 #17736

Merged
merged 1 commit into from
Mar 12, 2017
Merged

Move to GitLink 3.0 #17736

merged 1 commit into from
Mar 12, 2017

Conversation

jaredpar
Copy link
Member

@jaredpar jaredpar commented Mar 11, 2017

This makes two changes:

  1. Move us to GitLink 3.0
  2. Add source link info to all binaries we sign

The need for GitLink 3.0 is related to the efforts to no longer depend on a centralized version of MSBuild. The GitLink 2.0 approach to instrumenting PDBs was solution based and relied on having a centralized version of MSBuild installed. On a machine with multiple MSBuild installations, or a non-centrally installed version, this could lead to unpredictable or failing results.

Below is a link to a discussion I had with the GitLink team about this.

GitTools/GitLink#145

They acknowledged the problem and recommended we be an early adopter of the 3.0 toolset. This version allows for direct instrumentation of PDBs which is the style we originally preferred for source linking. The set of PDBs we ship is well known, smaller than the surface area the more general GitLink approach will hit, and gives us extra validation that our signed assembly list is correct.

@jaredpar
Copy link
Member Author

CC @dotnet/roslyn-ide

@jaredpar
Copy link
Member Author

CC @dotnet/roslyn-infrastructure

Sorry IDE, that was a typo

@jaredpar jaredpar force-pushed the fix-gitlink branch 2 times, most recently from 4647060 to 1fab098 Compare March 11, 2017 05:56
This makes two changes:

1. Move us to GitLink 3.0
1. Add source link info to all binaries we sign
@jaredpar
Copy link
Member Author

retest windows_debug_unit32_prtest please

@jaredpar jaredpar merged commit ce86fa7 into dotnet:master Mar 12, 2017
@jaredpar jaredpar deleted the fix-gitlink branch March 12, 2017 15:53
[string]$scriptDir = $PSScriptRoot

function Create-Directory([string]$dir) {
New-Item $dir -ItemType Directory -ErrorAction SilentlyContinue | out-null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if it legitimately fails to create the directory?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then presumably the next command which uses the directory will fail 😄

I don't meant to be trolly there but there isn't a good answer to this question. Asking if the directory actually failed to create or already exists is just a variation of the File.Exists problem. I could test for existence of the directory after the call but it's a racy check.

@@ -0,0 +1,41 @@
# Run GitLink on the binaries that we are producing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include a comment as to why the old mechanism wasn't sufficient?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(if the answer was "it's no longer supported", then that should have been written in the commit message)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I should have added more detail to this commit about that. I had put a write up of the problem in our previous convo and didn't think to add it here.

The PR has a discussion of why this approach was taken now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants