Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion eng/MSBuild/ProjectStaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

<!-- Amend the description based on stage -->
<PropertyGroup>
<Description Condition="'$(Stage)' == 'dev'">DEVELOPMENT BUILD - DO NOT USE IN PRODUCTION - $(Description)</Description>
<Description Condition="'$(Stage)' == 'obsolete'">OBSOLETE PACKAGE - $(Description)</Description>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!--
When DotNetFinalVersionKind is set to 'release', this branch will produce stable outputs for 'Shipping' packages
-->
<DotNetFinalVersionKind Condition="'$(DotNetFinalVersionKind)' == ''">release</DotNetFinalVersionKind>
<DotNetFinalVersionKind Condition="'$(DotNetFinalVersionKind)' == '' And '$(Stage)' != 'dev'">release</DotNetFinalVersionKind>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we moved this line to the targets file? That is, leave the original line in this file, and then copy the new line to the targets file.
Then, we'd not have to create individual props files... 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is not this file, this file needs to be here because there are some props files imported from Arcade infrastructure that depend on this being set, so if we move this to targets files, arcade props that depend on this won't work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible that we could hook this up differently but I think that would be too risky to do this late in the release. I'm fine if we want to explore a different way of doing this for main branch, but for the release branch I want to have the least amount of moving pieces possible, and moving the way we set a property used by the whole rest of arcade is much more risk that what I think we should take.

<!-- Enabling this rule will cause build failures on undocumented public APIs. -->
<SkipArcadeNoWarnCS1591>true</SkipArcadeNoWarnCS1591>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- In order to get the right package versions for projects that shouldn't stabilize, we need to set this property before
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unfortunate, it defines the stage property in an inconsistent place and makes it harder to use correctly. Can we do something else like have these projects override the DotNetFinalVersionKind property?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Directory.Build.props on library-specific projects to work around things like this is not that uncommon, in fact dotnet/runtime use this all the time. One more issue is that the reason why this property (DotnetFinalVersionKind) needs to be defined so early is because it needs to be defined before the import of `Version.BeforeCommonProps.props, which gets imported before the project, meaning that even if we want to override that property in the .csprojs it would still be too late for some other things that are derived from it.

importing the root level Directory.Build.props file. This property should be kept in here, as opposed to moving it to
the project itself. -->
<PropertyGroup>
<Stage>dev</Stage>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</PropertyGroup>

<PropertyGroup>
<Stage>dev</Stage>
<MinCodeCoverage>65</MinCodeCoverage>
<MinMutationScore>85</MinMutationScore>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- In order to get the right package versions for projects that shouldn't stabilize, we need to set this property before
importing the root level Directory.Build.props file. This property should be kept in here, as opposed to moving it to
the project itself. -->
<PropertyGroup>
<Stage>dev</Stage>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</PropertyGroup>

<PropertyGroup>
<Stage>dev</Stage>
<MinCodeCoverage>100</MinCodeCoverage>
<MinMutationScore>100</MinMutationScore>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- In order to get the right package versions for projects that shouldn't stabilize, we need to set this property before
importing the root level Directory.Build.props file. This property should be kept in here, as opposed to moving it to
the project itself. -->
<PropertyGroup>
<Stage>dev</Stage>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</PropertyGroup>

<PropertyGroup>
<Stage>dev</Stage>
<MinCodeCoverage>70</MinCodeCoverage>
<MinMutationScore>75</MinMutationScore>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- In order to get the right package versions for projects that shouldn't stabilize, we need to set this property before
importing the root level Directory.Build.props file. This property should be kept in here, as opposed to moving it to
the project itself. -->
<PropertyGroup>
<Stage>dev</Stage>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</PropertyGroup>

<PropertyGroup>
<Stage>dev</Stage>
<MinCodeCoverage>100</MinCodeCoverage>
<MinMutationScore>90</MinMutationScore>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- In order to get the right package versions for projects that shouldn't stabilize, we need to set this property before
importing the root level Directory.Build.props file. This property should be kept in here, as opposed to moving it to
the project itself. -->
<PropertyGroup>
<Stage>dev</Stage>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</PropertyGroup>

<PropertyGroup>
<Stage>dev</Stage>
<MinCodeCoverage>100</MinCodeCoverage>
<MinMutationScore>80</MinMutationScore>
</PropertyGroup>
Expand Down