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

Add SourceLink support #40

Closed
danmoseley opened this issue Apr 24, 2019 · 6 comments · Fixed by #54
Closed

Add SourceLink support #40

danmoseley opened this issue Apr 24, 2019 · 6 comments · Fixed by #54
Assignees
Labels
bug Something isn't working

Comments

@danmoseley
Copy link
Member

danmoseley commented Apr 24, 2019

We aren't currently embedding SourceLink information into the PDB - that allows a debugger to automatically find and pull the source files.

https://github.com/dotnet/sourcelink has info

C:\dotnet>dotnet tool install --global sourcelink
Since you just installed the .NET Core SDK, you will need to reopen the Command Prompt window before running the tool you installed.
You can invoke the tool using the following command: sourcelink
Tool 'sourcelink' (version '3.0.0') was successfully installed.
…
C:\dotnet>sourcelink test C:\pkg\lib\netstandard2.0\Microsoft.Spark.pdb | find /i "failed"
sourcelink test failed

(Note you need 2.1 installed currently to run the tool: ctaggart/SourceLink#380)

@danmoseley danmoseley added the bug Something isn't working label Apr 24, 2019
@danmoseley
Copy link
Member Author

We presumably want to have the build push the PDB to the symbol server if we don't already do that.

@eerhardt
Copy link
Member

eerhardt commented Apr 24, 2019

Note: this is also related to #36.

The way you enable source link is to add

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All" />

To your .csproj.

We presumably want to have the build push the PDB to the symbol server if we don't already do that.

It looks like it doesn't. https://github.com/dotnet/spark/blob/master/azure-pipelines.yml.

Another option instead of publishing the PDBs to microsoft's symbol server would be to use .snupkg packages, which contain the managed symbols. These can then be published to nuget.org. See #38

@imback82
Copy link
Contributor

imback82 commented May 2, 2019

Reopening this since the latest Nuget (v0.2.0) didn't resolve this issue.

C:\Users\terryk\AppData\Local\Temp\SymbolCache\Microsoft.Spark.pdb\FC4459596C9444E5BF94DB5AB514A50Bffffffff>sourcelink test Microsoft.Spark.pdb
52 Documents without URLs:
3d20db069a7cbd9db03bbe1bda4a83551294a771 sha1 csharp F:\workspace\_work\1\s\src\csharp\Microsoft.Spark\Attributes.cs
8d906a8caee6f89ae5d09e9fdfa9c985126cfd03 sha1 csharp F:\workspace\_work\1\s\src\csharp\Microsoft.Spark\PairRDDFunctions.cs
2b2e86eb4a182c19b54f26710dfb59b49edc876e sha1 csharp F:\workspace\_work\1\s\src\csharp\Microsoft.Spark\RDD.cs
8e7bd7977a7d70d52795c3376af25d94bb1c6f61 sha1 csharp F:\workspace\_work\1\s\src\csharp\Microsoft.Spark\SparkConf.cs
90d00ac412985fae0d58631c5a2c68cefd03a2e4 sha1 csharp F:\workspace\_work\1\s\src\csharp\Microsoft.Spark\SparkContext.cs
...
sourcelink test failed

@eerhardt
Copy link
Member

eerhardt commented May 2, 2019

@imback82 - where did you get the .pdb from? I can't find it on the symbols servers.`

Nevermind - I found them on the nuget.org symbols server.

@eerhardt
Copy link
Member

eerhardt commented May 2, 2019

I debugged the build, and the issue is our official build is on an internal VSTS repo that is mirrored from GitHub. But we want to point source link to the GitHub links.

It looks like dotnet/arcade has this solved:

https://github.com/dotnet/arcade/blob/6e5837e2fdd77c0da4f73376ee4498c42a01d2a1/src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryInfo.targets#L12-L38

My suggestion is that we should probably move dotnet/spark onto dotnet/arcade. There have been plenty of infrastructure issues that would just be solved if we used arcade in this repo.

@imback82
Copy link
Contributor

Fixed by #113.

Verified that source link test passed with the latest pdb:

C:\Temp>sourcelink test Microsoft.Spark.pdb
sourcelink test passed: Microsoft.Spark.pdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants