Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

help enable SourceLink for Giraffe #367

Closed
ctaggart opened this issue Sep 14, 2018 · 7 comments
Closed

help enable SourceLink for Giraffe #367

ctaggart opened this issue Sep 14, 2018 · 7 comments

Comments

@ctaggart
Copy link
Owner

No description provided.

@ctaggart
Copy link
Owner Author

The AppVeyor build failed with:

C:\projects\giraffe\src\Giraffe\obj\Release\net461\Giraffe.AssemblyInfo.fs(15,69): error FS2003: The attribute System.Reflection.AssemblyInformationalVersionAttribute specified version '2.0.1+911276555477b7cab2e4fe9a8e1105e32f96ec61', but this value is invalid and has been ignored [C:\projects\giraffe\src\Giraffe\Giraffe.fsproj]
https://ci.appveyor.com/project/ctaggart/giraffe/build/2.0.1-1

Usually that is a warning and not a failure. It shouldn't even be a warning and that was fixed on July 18th:

Support for arbitrary value in AssemblyInformationalVersionAttribute #4822
dotnet/fsharp#4822

The .NET SDK version is pinned. I'll try updating it.

@ctaggart
Copy link
Owner Author

https://github.com/Microsoft/visualfsharp/blob/master/build/targets/GenerateAssemblyAttributes.targets
shows July 18th, but still doesn't work in .NET Core SDK 2.1.402
https://github.com/dotnet/core/blob/master/release-notes/2.1/2.1.4/2.1.4-download.md

The fsproj has <TreatWarningsAsErrors>true</TreatWarningsAsErrors>.

Workaround is probably <NoWarn>FS2003</NoWarn>.

@dustinmoris
Copy link

Quick question, I've never seen a Directory.Build.props file. Why would the SourceLink configuration sit there rather than inside the Giraffe.fsproj file?

@ctaggart
Copy link
Owner Author

It is just an easy way to apply it to all projects. It is the normal way I add it to most solutions. Feel free to put in the fsproj if you like that better.

@dustinmoris
Copy link

Ok cool, thanks for clarification! It's good to know, but currently the Giraffe repo has only one project so I think I'll move it in there. I will also add it to the other Giraffe repos (Giraffe.Razor, Giraffe.DotLiquid, etc.) :)

@ctaggart
Copy link
Owner Author

I tested that it is working for Giraffe 3.0.0. Congrats on 3.0.0! 🎉

PS C:\Users\taggac> sourcelink print-json "C:\Users\taggac\Downloads\giraffe.3.0.0\lib\netstandard2.0\Giraffe.pdb"
{"documents":{"C:\\projects\\giraffe\\*":"https://raw.githubusercontent.com/giraffe-fsharp/Giraffe/a036cfe7d3ef52af68ed1d43b5fe477d4c10a211/*"}}

PS C:\Users\taggac> sourcelink test "C:\Users\taggac\Downloads\giraffe.3.0.0\lib\netstandard2.0\Giraffe.pdb"
sourcelink test passed: C:\Users\taggac\Downloads\giraffe.3.0.0\lib\netstandard2.0\Giraffe.pdb

I see it depends on TaskBuilder.fs 2.0.0 or higher. If you use 2.1.0, it also has SourceLink enabled. rspeele/TaskBuilder.fs#24

@dustinmoris
Copy link

Thanks! This will be in the next release: giraffe-fsharp/Giraffe@81b61b3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants