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 SourceLink2 support #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Luiz-Monad
Copy link

@Luiz-Monad Luiz-Monad commented Jun 22, 2019

Adding support for DotNet Core debugging by using portable PDBs.
It's all driven by paket itself !

I'll be waiting for SourceLink v2 to stabilize (actually I'm already using it), it's pretty cool and way better than the old symbol server that where a pain the sockets to configure in the Visual Studio.
The only issue I found is that the C# projects generate ".snupkg", F# projects instead do it the older way, that is, putting the "pdb" inside the normal "nupkg" ( I think its something with their msbuild ).
SnuPkg uses the v3 of nuget protocol and semver 2.0.

I'm using this settings on my vscode, in case it's useful for someone else.

"justMyCode": false,
"suppressJITOptimizations": true,
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
"symbolOptions": {
    "searchPaths": [
        "http://localhost:5000",
        "https://nuget.smbsrc.net/"
    ],
    // "searchMicrosoftSymbolServer": true,
    "cachePath": "C:/Users/Luiz/.symcache",
    "moduleFilter": {
        "mode": "loadAllButExcluded",
        "excludedModules": [ 
            "FSharp.Core.dll",
            "netstandard.dll",  ... others.... omitted
        ]                }            },
"sourceLinkOptions": {
    //"https://nuget.org/*": { "enabled": true },
    "*": { "enabled": true }
}  

Useful resources used to implement it:

https://www.hanselman.com/blog/ExploringNETCoresSourceLinkSteppingIntoTheSourceCodeOfNuGetPackagesYouDontOwn.aspx

https://carlos.mendible.com/2018/08/25/adding-sourcelink-to-your-net-core-library/

https://github.com/dotnet/sourcelink

https://github.com/ctaggart/SourceLink/wiki/Paket

@MangelMaxime
Copy link
Contributor

Hello @byte-666 ,

thank you for creating the PR :)

As mentioned on the Gitter channel, I reworked the process to package the library.

Could you please re-base the master on master and fix the breaking changes?

I'll be waiting for SourceLink v2 to stabilize

Do you mean, that we should wait of v2 before shipping it in the package? Or can we ship it as it is now?

@Luiz-Monad
Copy link
Author

Hello @byte-666 ,

thank you for creating the PR :)

As mentioned on the Gitter channel, I reworked the process to package the library.

Could you please re-base the master on master and fix the breaking changes?

I'll be waiting for SourceLink v2 to stabilize

Do you mean, that we should wait of v2 before shipping it in the package? Or can we ship it as it is now?

I think we can ship it now, it's just a tiny extra pdb in the nuget file, even if they change the way we publish it to the nuget, it shouldn't affect the library users. We can easily upgrade paket when they fix it.

The change I'm awaiting for is when the paket start using the snupkg in the paket pack instead of nupkg.
But FSharp libraries are usually so small it doesn't really matter for the user.

@MangelMaxime
Copy link
Contributor

The change I'm awaiting for is when the paket start using the snupkg in the paket pack instead of nupkg.

Note that we don't use anymore paket pack but dotnet pack.

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.

2 participants