ctaggart / SourceLink

Source Code On Demand
MIT License
356 stars 55 forks source link

Sourcelink tool issues with FsToolkit.ErrorHandling package #384

Closed TheAngryByrd closed 5 years ago

TheAngryByrd commented 5 years ago

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!

ctaggart commented 5 years ago

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

TheAngryByrd commented 5 years ago

Still the same error

sourcelink test FsToolkit.ErrorHandling.pdb
Device not configured
TheAngryByrd commented 5 years ago

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.

ctaggart commented 5 years ago

Can you print the sourcelink json?

TheAngryByrd commented 5 years ago
$ 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.

ctaggart commented 5 years ago

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>?~

TheAngryByrd commented 5 years ago

Thanks for confirming my suspicion!

ctaggart commented 5 years ago

@TheAngryByrd, it looks like you may have solved this: https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/44/files

TheAngryByrd commented 5 years ago

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?

ctaggart commented 5 years ago

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

TheAngryByrd commented 5 years ago

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