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

GH513: Enable SourceLink with embedded PDB #514

Merged
merged 3 commits into from
Aug 15, 2020
Merged

Conversation

gitfool
Copy link
Contributor

@gitfool gitfool commented May 3, 2020

Fixes #513.

@gitfool
Copy link
Contributor Author

gitfool commented Aug 9, 2020

@tmenier PTAL; I'd love to get this merged for the next [pre]release. 😁

@tmenier
Copy link
Owner

tmenier commented Aug 9, 2020

Thanks for the reminder. Admittedly I'm not fully up to speed on SourceLink but this is a little bit of a concern:

Including PDBs in the .nupkg is generally no longer recommended as it increases the size of the package and thus restore time for projects that consume your package, regardless of whether the user needs to debug through the source code of your library or not.

They recommend publishing a separate symbol package to NuGet instead. What do you think about going that route?

@gitfool
Copy link
Contributor Author

gitfool commented Aug 9, 2020

They recommend publishing a separate symbol package to NuGet instead. What do you think about going that route?

Ultimately it comes down personal preference, but I'd advise to keep it simple and embed the PDB. I wouldn't be concerned at all since portable PDBs are small, and combined with SourceLink they are tiny, so I always embed them.

To prove the above assertion, I rebased this PR and the generated nupkg files are composed as follows:

image
image

You'd save ~45KB and ~179KB respectively; hardly anything to be concerned about and, frankly, you'd save just as many KBs and be better off by dropping unsupported target frameworks.

@gitfool
Copy link
Contributor Author

gitfool commented Aug 9, 2020

I threw in a couple of other tweaks:

  • Fix test warning due to redundant use of async Task
  • Use Visual Studio 2019 image on AppVeyor for latest 3.1.3xx+ dotnet sdk
    • ... fixes a small issue with the build order when embedding untracked sources

Then this is what the nupkg (downloaded from the AppVeyor artifacts) looks like in NuGetPackageExplorer:

image

@tmenier tmenier merged commit 716e340 into tmenier:dev Aug 15, 2020
@tmenier
Copy link
Owner

tmenier commented Aug 15, 2020

Sounds good. You've talked me into it. :)

@gitfool gitfool deleted the gh513 branch August 15, 2020 22:49
@gitfool gitfool mentioned this pull request Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add SourceLink support
2 participants