Publishing a symbols package and Enabling Deterministic Builds#1347
Publishing a symbols package and Enabling Deterministic Builds#1347severussundar merged 17 commits intomainfrom
Conversation
Aniruddh25
left a comment
There was a problem hiding this comment.
LGTM. Appreciate the research and attention put into this.
ayush3797
left a comment
There was a problem hiding this comment.
LGTM after concluding on the NugetCommand@2 discussion. Thanks for making this change!
|
does the .nupkg file contains any pdb files? |
Yes, the pdb files are present in the primary Nuget package as well. I've listed the approaches I tried to exclude them from the primary Nuget here. Unfortunately, none of them worked, and since, the contribution to size of the Nuget package by the symbol files is insignificant, at the moment, it should be okay to include them in the primary package. |
|
If the pdb files are already in the main package, what's the need of a seperate symbols package which will contain the same pdb files? |
…thub.com/Azure/data-api-builder into dev/shyamsundarj/publish-symbols-package
The ideal state we want to be is where we don't have the symbols in the main NuGet package and publish the symbols package. We can continue to iterate on this to exclude the symbols from the main package. |
…thub.com/Azure/data-api-builder into dev/shyamsundarj/publish-symbols-package
## Why make this change? - Closes #1098 #1355 - Publishing a symbols package along with the primary Nuget to Nuget.org's symbol server, enables users to download the symbol files (using an IDE such as Visual Studio) and step through Data API builder source code. This provides them an enhanced debugging experience. - Deterministic builds are important as they enable verification that the resulting binary was built from the specified source and provides traceability. ## What is this change? - `SourceLink` .NET library is used to generate the symbols package. The generated symbols package has the same name as the primary package but with an extension `.snupkg` - In the pipeline task for pushing the nupkg to Nuget.org, the pattern is extended to push `.snupkg` as well - Deterministic builds require that the property `ContinousIntegrationBuild` be set to `true` during CI runs. `TF_BUILD` is a system variable that gets set to `true` during pipeline runs. `ContinousIntegrationBuild` is set to `true` conditionally depending on `TF_BUILD` being `true`. ## How was this tested? - [x] Build pipeline produces a symbols package ## Docs - [Docs for publishing a symbols package](https://github.com/dotnet/sourcelink) - [Docs for enabling deterministic builds](https://github.com/clairernovotny/DeterministicBuilds) - [Using Source Link for debugging in Visual Studio ](https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink#source-link-demo) ## Contents of Symbols Package 
Why make this change?
What is this change?
SourceLinkis used for adding source control metadata to the generated binaries..snupkg.snupkgas wellContinousIntegrationBuildbe set totrueduring CI runs.TF_BUILDis a system variable that gets set totrueduring pipeline runs.ContinousIntegrationBuildis set totrueconditionally depending onTF_BUILDbeingtrue.How was this tested?
Docs
Contents of Symbols Package