Merge | Pack Mds Target, Wire PR/CI Pipelines to Build2.proj#4033
Merge | Pack Mds Target, Wire PR/CI Pipelines to Build2.proj#4033
Conversation
Remove unnecessary dependencies from genapi project
Fix xml documentation file generation for implementation project
... it doesn't work
| <Error Text="PackageVersionAbstractions must be set!" | ||
| Condition="'$(PackageVersionAbstractions)' == ''" /> | ||
| <Error Text="PackageVersionLogging must be set!" | ||
| Condition="'$(PackageVersionLogging)' == ''" /> |
There was a problem hiding this comment.
PackMds currently fails unless the wrapper properties (PackageVersionAbstractions/Logging/Mds) are explicitly set. However, AbstractionsPackageVersion/LoggingPackageVersion can be resolved by the imported *Versions.props / *Versions.props files even when the wrapper properties are empty, and the nuspec substitution ultimately needs AbstractionsPackageVersion/LoggingPackageVersion. Consider validating the resolved AbstractionsPackageVersion/LoggingPackageVersion (and/or defaulting the wrapper properties to those resolved values) so PackMds works with default versioning and the behavior matches the parameter docs.
| <Error Text="PackageVersionAbstractions must be set!" | |
| Condition="'$(PackageVersionAbstractions)' == ''" /> | |
| <Error Text="PackageVersionLogging must be set!" | |
| Condition="'$(PackageVersionLogging)' == ''" /> | |
| <!-- Default wrapper properties from resolved versions when not explicitly provided --> | |
| <PropertyGroup> | |
| <PackageVersionAbstractions Condition="'$(PackageVersionAbstractions)' == '' and '$(AbstractionsPackageVersion)' != ''">$(AbstractionsPackageVersion)</PackageVersionAbstractions> | |
| <PackageVersionLogging Condition="'$(PackageVersionLogging)' == '' and '$(LoggingPackageVersion)' != ''">$(LoggingPackageVersion)</PackageVersionLogging> | |
| </PropertyGroup> | |
| <!-- Validate that a version is available either via wrapper or resolved property --> | |
| <Error Text="Abstractions package version could not be resolved. Set PackageVersionAbstractions or ensure AbstractionsPackageVersion is defined." | |
| Condition="'$(PackageVersionAbstractions)' == '' and '$(AbstractionsPackageVersion)' == ''" /> | |
| <Error Text="Logging package version could not be resolved. Set PackageVersionLogging or ensure LoggingPackageVersion is defined." | |
| Condition="'$(PackageVersionLogging)' == '' and '$(LoggingPackageVersion)' == ''" /> |
eng/pipelines/onebranch/steps/build-all-configurations-signed-dlls-step.yml
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #4033 +/- ##
==========================================
- Coverage 74.62% 68.09% -6.54%
==========================================
Files 280 275 -5
Lines 43814 66924 +23110
==========================================
+ Hits 32698 45570 +12872
- Misses 11116 21354 +10238
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
paulmedynski
left a comment
There was a problem hiding this comment.
Looks great - keep truckin'! Just a couple of comments.
| <ProjectReference Include="..\Microsoft.Cci.Extensions\Microsoft.Cci.Extensions.csproj" /> | ||
|
|
||
| <PackageReference Include="McMaster.Extensions.CommandLineUtils" /> | ||
| <PackageReference Include="System.Diagnostics.TextWriterTraceListener" /> |
There was a problem hiding this comment.
This is the 3rd PR I've seen this diff in lately, so they're definitely not needed 😄
# Conflicts: # build2.proj # eng/pipelines/onebranch/steps/code-analyze-step.yml
He's on vacation and said it's ok
eng/pipelines/onebranch/steps/build-all-configurations-signed-dlls-step.yml
Outdated
Show resolved
Hide resolved
| This is the version that is used as the version for the NuGet package. If it is not | ||
| overridden, the above default version will be used with the build number and a string suffix | ||
| appended (to indicate the version is pre-production). | ||
|
|
||
| NOTE/@TODO: Since the PackMds target in build2.proj directly calls nuget.exe, it will not | ||
| pick up this property. | ||
| --> | ||
| <MdsPackageVersion Condition="'$(MdsPackageVersion)' == ''">$(MdsVersionDefault).$(BuildNumber)-dev</MdsPackageVersion> | ||
|
|
||
| <!-- | ||
| This is the version that is used as the AssemblyVersion and FileVersion fields in the | ||
| assembly's manifest. If it is not overridden, it will default to the above default version | ||
| with the build number appended. | ||
| As a convenience feature, if a package version but not an assembly version is supplied, the | ||
| package version will have any suffix trimmed to generate valid assembly version. | ||
|
|
||
| NOTE: It is possible that the build number can be in the format xxxx.y which *may* overflow | ||
| the 16-bit integer for the revision part of the assembly version. For that reason, we simply | ||
| discard everything after the first part of the build number for the assembly version. | ||
| --> | ||
| <MdsAssemblyVersion Condition="'$(MdsAssemblyVersion)' == '' AND '$(MdsPackageVersion)' == ''">$(MdsVersionDefault).$(BuildNumber.Split('.')[0])</MdsAssemblyVersion> | ||
| <MdsAssemblyVersion Condition="'$(MdsAssemblyVersion)' == '' AND '$(MdsPackageVersion)' != ''">$(MdsPackageVersion.Split('-')[0])</MdsAssemblyVersion> |
There was a problem hiding this comment.
Yeah I don't think all this is necessary. We just need to flip the order of assigning the assembly version and the package version defaults.
| <!-- lib/netstandard2.0 - These are PlatformNotSupportedException assemblies --> | ||
| <file src="..\..\artifacts\Microsoft.Data.SqlClient.notsupported\$ReferenceType$-$Configuration$\netstandard2.0\Microsoft.Data.SqlClient.dll" target="lib\netstandard2.0\" exclude="" /> | ||
| <file src="..\..\artifacts\Microsoft.Data.SqlClient.notsupported\$ReferenceType$-$Configuration$\netstandard2.0\Microsoft.Data.SqlClient.pdb" target="lib\netstandard2.0\" exclude="" /> | ||
| <file src="..\..\artifacts\Microsoft.Data.SqlClient.ref\$ReferenceType$-$Configuration$\netstandard2.0\Microsoft.Data.SqlClient.xml" target="lib\netstandard2.0\" exclude="" /> | ||
|
|
| <!-- Versioning arguments --> | ||
| $(BuildNumberArgument) | ||
| $(PacakgeVersionArgument) | ||
|
|
||
| <!-- Reference Type Arguments --> | ||
| $(ReferenceTypeArgument) | ||
| $(PackageVersionAbstractionsArgument) | ||
| $(PackageVersionLoggingArgument) |
Description
This PR adds a PackMds target to Build2.proj that conveniently packages the MDS projects into a NuGet package. This PR also reworks the CI/PR pipelines to use the build2.proj targets to build, test, and package the MDS project.
Commentary has been added in-line.
Testing
Ran PR validation while still in draft mode and verifies that it generates good output. There are a lot of things to go through to verify that everything is behaving correctly, but it seems good.