ctaggart / SourceLink

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

SourceLink Test command failing for projects using github references #312

Closed eiriktsarpalis closed 6 years ago

eiriktsarpalis commented 6 years ago

Running dotnet sourcelink test on nupkg files that have been built using paket's github reference functionality will fail to validate because those files aren't tracked by the repo.

Repository that reproduces this behaviour

This is not really a bug of sourcelink, but was wondering if there's a workaround, a way to explicitly blacklist specific source files from being indexed.

ctaggart commented 6 years ago

@eiriktsarpalis Currently, for SourceLink 2, it is best to embed those github referenced source files. The easiest way to do that is simply to add a reference to SourceLink.Embed.PaketFiles as documented at https://github.com/ctaggart/SourceLink/wiki/Paket.

The readme also links to examples to embed those files without using that nupkg https://github.com/ctaggart/SourceLink#embedding-source-files

For SourceLink 3 https://github.com/ctaggart/SourceLink/issues/305, I'll probably build a SourceLink.PaketFiles that will add SourceRoot entries for each of the github referenced files instead of embedding.

eiriktsarpalis commented 6 years ago

Awesome, thanks!