xamarin-macios/Make.versions

171 строка
7.5 KiB
Plaintext
Исходник Обычный вид История

#
# A release branch requires updating the following six variables at the bottom of this file:
#
# IOS_PACKAGE_VERSION (major/minor/revision #)
# MAC_PACKAGE_VERSION (major/minor/revision #)
#
# IOS_NUGET_VERSION (major/minor/patch #)
# TVOS_NUGET_VERSION (major/minor/patch #)
# MACOS_NUGET_VERSION (major/minor/patch #)
2024-11-06 13:34:39 +03:00
# MACCATALYST_NUGET_VERSION (major/minor/patch #)
#
# Update version numbers on main as well, to the next version
#
#
# ** Version numbers **
#
# Versions are defined as: Major.Minor.Revison.Build
#
# Major/minor (first/second numbers - max 2 digits each):
# - Bump for major/minor releases.
#
# Revision (third number - max 2 digits):
# - Reset to 0 after a major or minor bump (do not use 99 for Xcode preview
# branches (use 0 instead), because otherwise we can't bump it further if
# needed).
# - Bump for service releases and previews.
# - Bump if commit distance becomes > 999.
# - Can also be bumped for other reasons (in particular there's no correlation
# between Preview/Service Release #X and Revision #Y).
# - Bumping revision to a high enough number to make it clear that there's
# no correlation is a valid reason to bump.
# - The revision must be bumped at the same time for both iOS and Mac
# (otherwise the commit distance will differ).
# - Also bump if the [IOS|MAC]_PACKAGE_VERSION lines change for any other
# reason (otherwise we end up with repeating version numbers, since the
# commit distance would restart at 0, while the other numbers wouldn't
# change).
# - Any other problem can also usually be solved by bumping the revision.
# - Do not refactor the revision to a separate variable, because the reason
# bumping the revision is a general solution for many problems is that it
# also resets the commit distance (which wouldn't happen if the revision was
# refactored to a separate variable).
#
# Build (fourth number - max 3 digits):
# - Automatically calculated as the number of commits since the last time any
# of the other three numbers changed (technically since the corresponding
# line changed in git).
#
2024-06-10 22:29:43 +03:00
IOS_PACKAGE_VERSION=17.99.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE)
#
# ** NuGet package version numbers **
#
# See dotnet/VERSIONS.md.
#
# Rules:
# * The first two numbers represent the major and minor version of the corresponding OS.
# * A third number will be added later (the commit distance).
#
# IMPORTANT: There must be *no* managed API differences unless the two first
# numbers (major.minor) changes.
# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)
IOS_NUGET_OS_VERSION=18.1
TVOS_NUGET_OS_VERSION=18.1
MACOS_NUGET_OS_VERSION=15.1
MACCATALYST_NUGET_OS_VERSION=18.1
[dotnet] Use the default .NET scheme for the default TargetPlatformVersion for library projects. (#21343) We must define the default platform version if it's not specified in the TFM, and according to the spec the default should not change for a given .NET version: * We release support for iOS 18.0 with .NET 9 * Apple releases iOS 18.1, we're still using .NET 9. This default continues to be iOS 18.0 * .NET 10 is shipped, and at this point we bump the default to iOS 19.0 Basically: this should be the last OS version of the platform in question when the current major .NET version is first released to stable. Ref: https://github.com/dotnet/designs/blob/8e6394406d44f75f30ea2259a425cb9e38d75b69/accepted/2020/net5/net5.md#os-versions However, this doesn't work well for Apple platforms: Whenever Apple releases new Xcode versions, our existing workloads might not be compatible with the new Xcode. We'll of course ship updateds workload with support for the new Xcode, but defaulting to an older target platform version would mean that developers wouldn't get the new workload, they'd get the old one. This is exacerbated by the fact that Apple aggressively auto-updates Xcode on developers' machines: they might wake up one day to a broken build - the obvious fix ("dotnet workload update") doesn't fix anything - even if we've shipped updated workloads - because the default is to use the old one. They'd have to manually specify the target platform version in the target platform to get the updated workload ("net8.0-ios17.2" to use the iOS 17.2 workload instead of "net8.0-ios", which would use the default (old/initial/17.0) .NET 8 workload) - and then update _again_ when the next Xcode comes around. At this point the point of having a sane default value is totally out the window, because everybody would have to specify (and continuously update) a platform version in their project files to keep their projects building. So we've made the decision that the default target platform version is always the latest supported target platform version. Given the previous example: once we've implemented and released support for iOS 18.1, the updated iOS workload will use 18.1 as the default TPV for iOS. On the other hand, this turns out to be somewhat of a complication for library developers, because they typically don't need Xcode to build their projects, and if we auto-update their TargetPlatformVersion to the latest, then all their customers have to also update their workloads, which for some people end up being a rather nasty surprise (because with the above algorithm it happens without developer action). Thus we follow .NET's default platform version scheme for library projects: it won't change in minor .NET releases. Related design/docs PRs: * https://github.com/dotnet/docs/pull/43089 * https://github.com/dotnet/designs/pull/324
2024-10-21 11:30:50 +03:00
# The following are the OS versions we first supported with the current .NET version.
# These versions must *not* change with minor .NET updates, only major .NET releases.
IOS_TARGET_PLATFORM_VERSION_LIBRARY=18.0
TVOS_TARGET_PLATFORM_VERSION_LIBRARY=18.0
MACOS_TARGET_PLATFORM_VERSION_LIBRARY=15.0
MACCATALYST_TARGET_PLATFORM_VERSION_LIBRARY=18.0
[dotnet] Stop using a separate default platform version. (#19754) In theory we should define the default platform version if it's not specified in the TFM, and this default should not change for a given .NET version: * We release support for iOS 17.0 with .NET 8 * Apple releases iOS 18.0, we're still using .NET 8. This default continues to be iOS 17.0 * .NET 9 is shipped, and at this point we bump the default to iOS 18.0 Basically: this should be the last OS version of the platform in question when the current major .NET version is first released to stable. Ref: https://github.com/dotnet/designs/blob/8e6394406d44f75f30ea2259a425cb9e38d75b69/accepted/2020/net5/net5.md#os-versions However, this doesn't work well for Apple platforms: whenever Apple releases new Xcode versions, our existing workloads might not be compatible with the new Xcode. We'll of course ship updateds workload with support for the new Xcode, but defaulting to an older target platform version would mean that developers wouldn't get the new workload, they'd get the old one. This is exacerbated by the fact that Apple aggressively auto-updates Xcode on developers' machines: they might wake up one day to a broken build - the obvious fix ("dotnet workload update") doesn't fix anything - even if we've shipped updated workloads - because the default is to use the old one. They'd have to manually specify the target platform version in the target platform to get the updated workload ("net8.0-ios17.2" to use the iOS 17.2 workload instead of "net8.0-ios", which would use the default (old/initial/17.0) .NET 8 workload) - and then update _again_ when the next Xcode comes around. At this point the point of having a sane default value is totally out the window, because everybody would have to specify (and continuously update) a platform version in their project files to keep their projects building. So we've made the decision that the default target platform version is always the latest target platform version.
2024-01-09 11:47:07 +03:00
# In theory we should define the default platform version if it's not specified in the TFM. The default should not change for a given .NET version:
# * We release support for iOS 14.5 with .NET 6
# * Apple releases iOS 15.0, we're still using .NET 6. This default continues to be iOS 14.5
# * .NET 7 is shipped, and at this point we bump the default to iOS 15.0
# Basically: this should be the last OS version of the platform in question when the current major .NET version is first released to stable.
# Ref: https://github.com/dotnet/designs/blob/8e6394406d44f75f30ea2259a425cb9e38d75b69/accepted/2020/net5/net5.md#os-versions
[dotnet] Stop using a separate default platform version. (#19754) In theory we should define the default platform version if it's not specified in the TFM, and this default should not change for a given .NET version: * We release support for iOS 17.0 with .NET 8 * Apple releases iOS 18.0, we're still using .NET 8. This default continues to be iOS 17.0 * .NET 9 is shipped, and at this point we bump the default to iOS 18.0 Basically: this should be the last OS version of the platform in question when the current major .NET version is first released to stable. Ref: https://github.com/dotnet/designs/blob/8e6394406d44f75f30ea2259a425cb9e38d75b69/accepted/2020/net5/net5.md#os-versions However, this doesn't work well for Apple platforms: whenever Apple releases new Xcode versions, our existing workloads might not be compatible with the new Xcode. We'll of course ship updateds workload with support for the new Xcode, but defaulting to an older target platform version would mean that developers wouldn't get the new workload, they'd get the old one. This is exacerbated by the fact that Apple aggressively auto-updates Xcode on developers' machines: they might wake up one day to a broken build - the obvious fix ("dotnet workload update") doesn't fix anything - even if we've shipped updated workloads - because the default is to use the old one. They'd have to manually specify the target platform version in the target platform to get the updated workload ("net8.0-ios17.2" to use the iOS 17.2 workload instead of "net8.0-ios", which would use the default (old/initial/17.0) .NET 8 workload) - and then update _again_ when the next Xcode comes around. At this point the point of having a sane default value is totally out the window, because everybody would have to specify (and continuously update) a platform version in their project files to keep their projects building. So we've made the decision that the default target platform version is always the latest target platform version.
2024-01-09 11:47:07 +03:00
# However, this doesn't work well for Apple platforms: Whenever Apple releases
# new Xcode versions, our existing workloads might not be compatible with the
# new Xcode. We'll of course ship updateds workload with support for the new
# Xcode, but defaulting to an older target platform version would mean that
# developers wouldn't get the new workload, they'd get the old one. This is
# exacerbated by the fact that Apple aggressively auto-updates Xcode on
# developers' machines: they might wake up one day to a broken build - the
# obvious fix ("dotnet workload update") doesn't fix anything - even if we've
# shipped updated workloads - because the default is to use the old one.
# They'd have to manually specify the target platform version in the target
# platform to get the updated workload ("net8.0-ios17.2" to use the iOS 17.2
# workload instead of "net8.0-ios", which would use the default
# (old/initial/17.0) .NET 8 workload) - and then update _again_ when the next
# Xcode comes around. At this point the point of having a sane default value
# is totally out the window, because everybody would have to specify (and
# continuously update) a platform version in their project files to keep their
# projects building.
# So we've made the decision that the default target platform version is
# always the latest target platform version.
[dotnet] Rework KnownFrameworkReference so that 'net6.0-*' TargetFrameworks work when building with .NET 7. Fixes #15375. The KnownFrameworkReference now references the exact versions of the ref and runtime packs we're shipping with the sdk pack, instead of telling the build to use whatever version is defined in the workload. Then in the workload we specify the latest released version of the .NET 6 for the ref and runtime packs. Finally we add an aliased sdk pack, which points to the .NET 6 sdk pack, and when we're building a .NET 6 TargetFramework we load this aliased sdk pack instead of the one we're shipping with this workload. Putting this together means that: * When we're building a .NET 7 TargetFramework, we load the sdk pack shipped with the workload, which adds a KnownFrameworkReference which references the ref and runtime packs with the same version as the sdk pack. * When we're building a .NET 6 TargetFramework, we load the (aliased) sdk pack which points to the latest stable .NET 6 sdk pack. That sdk pack will add a KnownFrameworkReference that tells the build to use the ref and runtime pack versions specified in the workload - which are now pointing to the .NET 6 ref and runtime pack versions. Thus we use the .NET 6 sdk, ref and runtime packs when building a .NET 6 TargetFramework, and we use the .NET 7 sdk, ref and runtime packs when building a .NET 7 TargetFramework. According to the workload design spec [1], this is supposed to be implemented by using aliased ref and runtime packs, but that doesn't work due to https://github.com/dotnet/sdk/issues/26384. Fixes https://github.com/xamarin/xamarin-macios/issues/15375. [1]: https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-manifest.md?rgh-link-date=2022-06-30T08%3A25%3A10Z#side-by-side-workload-pattern
2022-06-30 14:04:04 +03:00
[dotnet] Use the default .NET scheme for the default TargetPlatformVersion for library projects. (#21343) We must define the default platform version if it's not specified in the TFM, and according to the spec the default should not change for a given .NET version: * We release support for iOS 18.0 with .NET 9 * Apple releases iOS 18.1, we're still using .NET 9. This default continues to be iOS 18.0 * .NET 10 is shipped, and at this point we bump the default to iOS 19.0 Basically: this should be the last OS version of the platform in question when the current major .NET version is first released to stable. Ref: https://github.com/dotnet/designs/blob/8e6394406d44f75f30ea2259a425cb9e38d75b69/accepted/2020/net5/net5.md#os-versions However, this doesn't work well for Apple platforms: Whenever Apple releases new Xcode versions, our existing workloads might not be compatible with the new Xcode. We'll of course ship updateds workload with support for the new Xcode, but defaulting to an older target platform version would mean that developers wouldn't get the new workload, they'd get the old one. This is exacerbated by the fact that Apple aggressively auto-updates Xcode on developers' machines: they might wake up one day to a broken build - the obvious fix ("dotnet workload update") doesn't fix anything - even if we've shipped updated workloads - because the default is to use the old one. They'd have to manually specify the target platform version in the target platform to get the updated workload ("net8.0-ios17.2" to use the iOS 17.2 workload instead of "net8.0-ios", which would use the default (old/initial/17.0) .NET 8 workload) - and then update _again_ when the next Xcode comes around. At this point the point of having a sane default value is totally out the window, because everybody would have to specify (and continuously update) a platform version in their project files to keep their projects building. So we've made the decision that the default target platform version is always the latest supported target platform version. Given the previous example: once we've implemented and released support for iOS 18.1, the updated iOS workload will use 18.1 as the default TPV for iOS. On the other hand, this turns out to be somewhat of a complication for library developers, because they typically don't need Xcode to build their projects, and if we auto-update their TargetPlatformVersion to the latest, then all their customers have to also update their workloads, which for some people end up being a rather nasty surprise (because with the above algorithm it happens without developer action). Thus we follow .NET's default platform version scheme for library projects: it won't change in minor .NET releases. Related design/docs PRs: * https://github.com/dotnet/docs/pull/43089 * https://github.com/dotnet/designs/pull/324
2024-10-21 11:30:50 +03:00
# However, this turns out to be somewhat of a complication for library developers,
# because they typically don't need Xcode to build their projects, and if we auto-
# update their TargetPlatformVersion to the latest, then all their customers
# have to also update their workloads, which for some people end up being a rather
# nasty surprise (because with the above algorithm it happens without developer
# action). Thus we follow .NET's default platform version scheme for library projects:
# it won't change in minor .NET releases.
[dotnet] Add warning when the TargetPlatformVersion isn't supported (#19901) We've used to ignore the target platform version (the "17.0" part in "net8.0-ios17.0") since our initial .NET relaese - customers could specify any valid OS version between the minimum and maximum versions, and we'd completely ignore the value [1]. The purpose of the target platform version is to specify which bindings to choose: "net8.0-ios17.0" would mean that the developer wants packages that have bindings for iOS 17.0 (and earlier iOS versions, but not later iOS versions). So saying "net8.0-ios11.0" would technically mean that the developer would want our bindings for iOS 11.0 (and earlier iOS versions, but not later iOS versions). The problem is that we don't ship any such thing... we shipped iOS 17.0 bindings in .NET 8, and that's it, you can't choose to build with something that does *not* have bindings for iOS 17.0. This will change with multi-targeting: we'll support *some* matrix of bindings. For instance, we might want to support the OS version we shipped initial support in any given .NET release + the latest OS version. For example, we might want to support both of these: * net8.0-ios17.0 * net8.0-ios17.2 This means that the target platform version (17.0/17.2) can't keep staying ignored. There was an somewhat related issue with the `SdkSupportedTargetPlatformVersion`, where we're now able to distinguish between old versions we no longer support and new versions that limits the valid values for TargetPlatformVersion (see 74d83ca7e30b40c5d7224ca0be35c47b64d9f82b). We've already taken advantage of this to properly annotate every version, even in .NET 8 (in a future service update), because the dotnet/sdk change required to understand the new annotations (and ignore old versions in the `SdkSupportedTargetPlatformVersion` item group) won't be shipped until .NET 9, so this won't be a breaking change in .NET 8. However, we'd still like to give customers a heads up that their project files need to change, so this PR adds a warning (that tells developers what to do), and then in .NET 9 we'll make the warning an error instead. Side note: Android is also making an invalid target platform version an error in .NET 9: https://github.com/xamarin/xamarin-android/pull/8569. [1]: We'd ignore the value for executable projects. It did have an effect for library projects that were packed into NuGets: the target platform version would be stored in the NuGet.
2024-01-25 11:23:03 +03:00
#
# Here we list all the releases we support for each platform.
#
# Format: space-separated list of TargetFramework-OSVersion
#
# Example:
#
# SUPPORTED_API_VERSIONS_IOS=net8.0-17.0 net8.0-17.2
#
# This means the iOS workload shipped from the current branch supports projects with:
# <TargetFramework>net8.0-17.0</TargetFramework>
# and
# <TargetFramework>net8.0-17.2</TargetFramework>
# and even:
# <TargetFrameworks>net8.0-17.0;net8.0-17.2</TargetFrameworks>
#
# When shipping support for a preview Xcode, we might add entries here for a preview release into a stable release.
#
# Example:
#
# SUPPORTED_API_VERSIONS_IOS=net9.0-18.0
#
# If the current branch is stable .NET 8 using Xcode 15.0 (aka iOS 17.0), this
# would add support for trying the preview release by doing:
#
# <TargetFramework>net9.0-18.0</TargetFramework>
# <NoWarn>XCODE_16_0_PREVIEW;$(NoWarn)</NoWarn>
[dotnet] Add warning when the TargetPlatformVersion isn't supported (#19901) We've used to ignore the target platform version (the "17.0" part in "net8.0-ios17.0") since our initial .NET relaese - customers could specify any valid OS version between the minimum and maximum versions, and we'd completely ignore the value [1]. The purpose of the target platform version is to specify which bindings to choose: "net8.0-ios17.0" would mean that the developer wants packages that have bindings for iOS 17.0 (and earlier iOS versions, but not later iOS versions). So saying "net8.0-ios11.0" would technically mean that the developer would want our bindings for iOS 11.0 (and earlier iOS versions, but not later iOS versions). The problem is that we don't ship any such thing... we shipped iOS 17.0 bindings in .NET 8, and that's it, you can't choose to build with something that does *not* have bindings for iOS 17.0. This will change with multi-targeting: we'll support *some* matrix of bindings. For instance, we might want to support the OS version we shipped initial support in any given .NET release + the latest OS version. For example, we might want to support both of these: * net8.0-ios17.0 * net8.0-ios17.2 This means that the target platform version (17.0/17.2) can't keep staying ignored. There was an somewhat related issue with the `SdkSupportedTargetPlatformVersion`, where we're now able to distinguish between old versions we no longer support and new versions that limits the valid values for TargetPlatformVersion (see 74d83ca7e30b40c5d7224ca0be35c47b64d9f82b). We've already taken advantage of this to properly annotate every version, even in .NET 8 (in a future service update), because the dotnet/sdk change required to understand the new annotations (and ignore old versions in the `SdkSupportedTargetPlatformVersion` item group) won't be shipped until .NET 9, so this won't be a breaking change in .NET 8. However, we'd still like to give customers a heads up that their project files need to change, so this PR adds a warning (that tells developers what to do), and then in .NET 9 we'll make the warning an error instead. Side note: Android is also making an invalid target platform version an error in .NET 9: https://github.com/xamarin/xamarin-android/pull/8569. [1]: We'd ignore the value for executable projects. It did have an effect for library projects that were packed into NuGets: the target platform version would be stored in the NuGet.
2024-01-25 11:23:03 +03:00
#
# Note that any SUPPORTED_API_VERSIONS entry below for older OS versions need a corresponding entry in
# the eng/Version.Details.xml and eng/Versions.props files.
#
# First add the versions for the current branch. DO NOT TOUCH THIS. Add older branches below.
SUPPORTED_API_VERSIONS_IOS=$(DOTNET_TFM)-$(IOS_NUGET_OS_VERSION)
SUPPORTED_API_VERSIONS_TVOS=$(DOTNET_TFM)-$(TVOS_NUGET_OS_VERSION)
SUPPORTED_API_VERSIONS_MACOS=$(DOTNET_TFM)-$(MACOS_NUGET_OS_VERSION)
SUPPORTED_API_VERSIONS_MACCATALYST=$(DOTNET_TFM)-$(MACCATALYST_NUGET_OS_VERSION)
# Add older versions here!
SUPPORTED_API_VERSIONS_IOS+=net8.0-17.0
SUPPORTED_API_VERSIONS_TVOS+=net8.0-17.0
SUPPORTED_API_VERSIONS_MACOS+=net8.0-14.0
SUPPORTED_API_VERSIONS_MACCATALYST+=net8.0-17.0
SUPPORTED_API_VERSIONS_IOS+=net8.0-18.0
SUPPORTED_API_VERSIONS_TVOS+=net8.0-18.0
SUPPORTED_API_VERSIONS_MACOS+=net8.0-15.0
SUPPORTED_API_VERSIONS_MACCATALYST+=net8.0-18.0
SUPPORTED_API_VERSIONS_IOS+=net9.0-18.0
SUPPORTED_API_VERSIONS_TVOS+=net9.0-18.0
SUPPORTED_API_VERSIONS_MACOS+=net9.0-15.0
SUPPORTED_API_VERSIONS_MACCATALYST+=net9.0-18.0