-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce targeting properties #12161
Conversation
Targeting implementation of https://github.com/dotnet/arcade/pull/11903/files. Adds three properties to allow repos to defer some/all of their target framework maintenance to arcade. Arcade already had a file like this for its own purposes. I've removed that and hoisted arcade's targeting property into its Directory.Build.props.
<PropertyGroup> | ||
<PropertyGroup> | ||
<NetCurrent>net8.0</NetCurrent> | ||
<NetSupported>net7.0;net6.0</NetSupported> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to split those apart as otherwise repos like dotnet/runtime that use platform tfms couldn't use them, i.e.:
<TargetFrameworks>$(NetCurrent)-windows;$(NetCurrent);$(NetPrevious)-windows;$(NetPrevious);$(NetMinimum)-windows;$(NetMinimum)</TargetFrameworks>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
- NetSupported - Supported, released versions of .NET | ||
- NetCurrentAndSupported - Supported, released versions of .NET and the current version. | ||
|
||
Repos can choose set their TargetFrameworks properties using NetCurrent or NetSupported, potentially in conjunction with other target frameworks a project might |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should avoid defining properties that concatenate multiple TFMs as that makes it really hard to reason about their inner builds and it doesn't work when targeting platforms or RIDs. Today, the TargetFrameworks
string tells you the number of inner builds and what it targets. As someone who spends a large amount of time in project files, I would like to keep that metric.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | ||
<Project> | ||
<!-- Repositories using the arcade SDK can stay up to date with their target framework more easily using the properties in this file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should put this into the guide for onboarding Arcade so that new repos also copy this file and what it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that we should put this into the Onboarding Arcade guide but there's nothing to copy as this file is part of the Arcade.Sdk. Repositories will have access to these properties by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put it into the Arcade Sdk documentation already:
I did not choose the onboarding guide because onboarding isn't that common any longer.
- NetCurrent - The TFM of the major release of .NET that the Arcade SDK aligns with. | ||
- NetPrevious - The previously released version of .NET (e.g. this would be net7 if NetCurrent is net8) | ||
- NetMinimum - Lowest supported version of .NET the time of the release of NetCurrent. E.g. if NetCurrent is net8, then NetMinimum is net6 | ||
- NetFrameworkMinimum - Lowest supported version of .NET Framework the time of the release of NetCurrent. E.g. if NetCurrent is net8, then NetFrameworkMinimum is net462 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jkotas do those property names make sense to you? Their naming inspiration comes from dotnet/runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names look reasonable to me.
Nit: It is not obvious from the property name that the property value is TFM. It is the usual name verbosity tradeoff. Since this is for our internal use only, I do not see a problem with the current names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I would like to hear @jkotas opinion before merging.
* Introduce targeting properties Targeting implementation of https://github.com/dotnet/arcade/pull/11903/files. Adds three properties to allow repos to defer some/all of their target framework maintenance to arcade. Arcade already had a file like this for its own purposes. I've removed that and hoisted arcade's targeting property into its Directory.Build.props.
* Introduce targeting properties Targeting implementation of https://github.com/dotnet/arcade/pull/11903/files. Adds three properties to allow repos to defer some/all of their target framework maintenance to arcade. Arcade already had a file like this for its own purposes. I've removed that and hoisted arcade's targeting property into its Directory.Build.props.
* Introduce targeting properties Targeting implementation of https://github.com/dotnet/arcade/pull/11903/files. Adds three properties to allow repos to defer some/all of their target framework maintenance to arcade. Arcade already had a file like this for its own purposes. I've removed that and hoisted arcade's targeting property into its Directory.Build.props.
* Introduce targeting properties Targeting implementation of https://github.com/dotnet/arcade/pull/11903/files. Adds three properties to allow repos to defer some/all of their target framework maintenance to arcade. Arcade already had a file like this for its own purposes. I've removed that and hoisted arcade's targeting property into its Directory.Build.props.
* Introduce targeting properties (#12161) * Introduce targeting properties Targeting implementation of https://github.com/dotnet/arcade/pull/11903/files. Adds three properties to allow repos to defer some/all of their target framework maintenance to arcade. Arcade already had a file like this for its own purposes. I've removed that and hoisted arcade's targeting property into its Directory.Build.props. * Fixup the TFM * Remove import
Targeting implementation of https://github.com/dotnet/arcade/pull/11903/files. Adds three properties to allow repos to defer some/all of their target framework maintenance to arcade. Arcade already had a file like this for its own purposes. I've removed that and hoisted arcade's targeting property into its Directory.Build.props.
To double check: