ctaggart / SourceLink

Source Code On Demand

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sourcelink tool issues with FsToolkit.ErrorHandling package

TheAngryByrd opened this issue · comments

FsToolkit.ErrorHandling just published with support for SourceLink using Microsoft.SourceLink.GitHub. I'm using the global sourcelink tool to do some testing of the package, which I'm assuming should work.

When I download the package from nuget and run sourcelink test I get an error

sourcelink test fstoolkit.errorhandling.1.1.0.nupkg
Device not configured

When I run it against the package built locally it seems fine

sourcelink test FsToolkit.ErrorHandling.1.1.0.nupkg
sourcelink test passed: lib/net461/FsToolkit.ErrorHandling.pdb
sourcelink test passed: lib/netstandard2.0/FsToolkit.ErrorHandling.pdb

Also when I run any of the print commands on either the downloaded or the locally built I get an error

sourcelink print-urls FsToolkit.ErrorHandling.1.1.0.nupkg
Invalid COR20 header signature.

Do you have any guidance diagnosing this? Thanks!

I would download the nupkg from the server, unzip it, and run sourcelink test on each of the pdb files as a start.

Still the same error

sourcelink test FsToolkit.ErrorHandling.pdb
Device not configured

Running print-urls does return something

sourcelink print-urls FsToolkit.ErrorHandling.pdb
108c97e71af54a0fb3d40544095ae9a5 md5 fsharp /Users/tamizhvendan/DemystifyFpWorks/FsToolkit.ErrorHandling/src/FsToolkit.ErrorHandling/List.fs
https://demystifyfp/raw/demystifyfp/FsToolkit.ErrorHandling/68a1c34d29809b5c60cb53ee9e7d4591229fb54f/src/FsToolkit.ErrorHandling/List.fs
5de054cef9dc4df18b20eb43abcc6ab6 md5 fsharp /Users/tamizhvendan/DemystifyFpWorks/FsToolkit.ErrorHandling/src/FsToolkit.ErrorHandling/Option.fs
https://demystifyfp/raw/demystifyfp/FsToolkit.ErrorHandling/68a1c34d29809b5c60cb53ee9e7d4591229fb54f/src/FsToolkit.ErrorHandling/Option.fs
...

But the urls seems wrong. I'll probably have to open an issue in the dotnet/sourcelink repository too.

Can you print the sourcelink json?

$ sourcelink print-json FsToolkit.ErrorHandling.pdb
{"documents":{"/Users/tamizhvendan/DemystifyFpWorks/FsToolkit.ErrorHandling/*":"https://demystifyfp/raw/demystifyfp/FsToolkit.ErrorHandling/68a1c34d29809b5c60cb53ee9e7d4591229fb54f/*"}}

I opened an issue over in FsToolkit's repo. I think we may be missing the PublishRepositoryUrl as a needed project property.

Yeah, that URL is wrong. Start there. It should be the full url.
https://github.com/dotnet/sourcelink#using-source-link-in-net-projects
Do you have <PublishRepositoryUrl>true</PublishRepositoryUrl>?

Thanks for confirming my suspicion!

Yep the main issue is fixed now.

I'm still curious as to why I get :

sourcelink print-urls FsToolkit.ErrorHandling.1.1.0.nupkg
Invalid COR20 header signature.

Want me to open a new issue for it?

@TheAngryByrd, can you please open up an issue for the COR20 header error? Did you resolve it?

I didn't resolve it but I'll get to opening another issue sometime soon