Skip to content
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

Add Supported OS JSON files #9294

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Add Supported OS JSON files #9294

wants to merge 5 commits into from

Conversation

richlander
Copy link
Member

@richlander richlander commented May 1, 2024

This is an proposal of a new schema for OS Support information. It is based on a collaboration with @Falco20019 with ideas developed in #9210.

Once we agree, the intent is to merge this PR.

Goals:

The endoflife site is pretty cool:

@richlander richlander marked this pull request as draft May 1, 2024 23:02
@richlander
Copy link
Member Author

FYI: @martincostello

"arm64",
"arm"
],
"supported-cycles": [
Copy link
Member

Choose a reason for hiding this comment

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

Just curious, why is this termed "cycles" rather than "versions"?

Copy link
Contributor

Choose a reason for hiding this comment

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

We tried to keep the terminology close to https://endoflife.date/docs/api

release-notes/9.0/supported-os.json Show resolved Hide resolved
@MichaelSimons
Copy link
Member

Looping in @joeloff as the Microsoft.Deployment.DotNet.Releases library is going to need to react.

@richlander
Copy link
Member Author

Having @joeloff react could be good. I assume there is no actual pressing reason since this information is purely additive not breaking.

@richlander
Copy link
Member Author

I removed most of the wildcards. Two outstanding issues:

  • I don't know what to include for Mac Catalyst.
  • I'm sure that the Windows versions are correct.

@Falco20019
Copy link
Contributor

I will give it a look later today and try to fill the holes if possible :)

Copy link
Contributor

@Falco20019 Falco20019 left a comment

Choose a reason for hiding this comment

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

We might want to split the supported-cycles up. Because there is the argument that Microsoft only gives technical support for OS that are maintained and not EOL and there is also the versions supported by the compile tool chain (SupportedOSPlatformVersion). These are different and both are of interest.

The minimum SupportedOSPlatformVersion is usually just one specific version (not an array) whereas the supported-cycles is usually an array where versions drop out once they are EOL in my opinion. supported-os.md mixes this up a bit. It talks about supported-cycles for Windows and Linux and about SupportedOSPlatformVersion for mobile platforms. SupportedOSPlatformVersion for Windows would be 10.0.17763.0.

"source": "Ubuntu 16.04"
},
{
"architecture": "arm32",
Copy link
Contributor

Choose a reason for hiding this comment

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

I would stick with architectures as array instead of having a second alternative architecture as a single field. Makes automated processing easier.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

"arm64"
],
"supported-cycles": [
"15+"
Copy link
Contributor

Choose a reason for hiding this comment

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

Mac Catalyst versions seem to correspond to iOS versions (and support lifetimes). The support linked to macOS seems more complex according to https://stackoverflow.com/a/69748714 but for this document, keeping it synced with iOS should be fine.

Copy link
Member

Choose a reason for hiding this comment

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

We can't really sync with iOS here since we support earlier iOS versions than what Mac Catalyst supports, using 15.0+ is correct here since it really depends on the lowest macOS version we support and which Mac Catalyst version that one ships with (i.e. 15.0 because we support macOS 12.0)

Copy link
Contributor

Choose a reason for hiding this comment

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

I also think this is mostly because of min-sdk and supported-cycles being mixed up. The min-sdk will be separate of iOS, the supported-cycles most probably not.

"arm"
],
"supported-cycles": [
"API 21+"
Copy link
Contributor

Choose a reason for hiding this comment

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

Android is a bit special since there are 3 different versions (compileSdkVersion, minSdkVersion and targetSdkVersion). Also support varies if using .NET MAUI for .NET 8 (API 21+) or .NET MAUI Blazor (API 24+).

TargetFramework is specifying the compileSdkVersion. When using i.e. net8.0-android34.0 the compileSdkVersion will be set to API 34. When using net8.0-android, the SDK is deciding itself what to use (usually pretty much latest). AFAIK, MSBuild also set's the targetSdkVersion in the manifest to that.

SupportedOSPlatformVersion is setting minSdkVersion, which is mostly for getting build warnings if some calls are not available and need workarounds. It's also used by the Play Store to specify which devices are supported and it's tested on.

targetSdkVersion/compileSdkVersion is mostly only the latest version and defaults are found here: https://learn.microsoft.com/en-us/dotnet/standard/frameworks#os-version-in-tfms

supported-cycles is really all about the minSdkVersion. Technically, this is API 21+ or 24+. In the supported-os I would more expect the real OS versions which would be 12, 12.1, 13, 14 and 15.

I would therefore propse here:

"supported-cycles": [
  "12",
  "12.1",
  "13",
  "14",
  "15"
],
"min-sdk-maui": "21",
"min-sdk-blazor": "24"

Copy link
Member

Choose a reason for hiding this comment

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

While what you wrote is correct we have been using the API version instead of the Android OS version pretty much everywhere else, and it it's also what a user would set for SupportedOSPlatformVersion in the project file.

I'd prefer if we use API version for consistency.

Copy link
Contributor

@Falco20019 Falco20019 May 3, 2024

Choose a reason for hiding this comment

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

My main issue is what I wrote here: #9294 (review)

The current supported-os.md is mixing up SupportedOSPlatformVersion and supported-cycles. SupportedOSPlatformVersion for Windows is not even mentioned anywhere.

For me as an end-user it's pretty hard to keep everything locally in sync because our end-customers are not interested in our SupportedOSPlatformVersion but about what OS we support them on. And I am interested on that as well from the perspective for what OS I get support from Microsoft if I stumble into issues. The documentation is currently only covering half of that and also not very consistent.

I would therefore like to see both things in the JSON. The real OS cycle supported (supported-cycles) but also the min supported technical SDK (SupportedOSPlatformVersion which for Android is already different between MAUI and Blazor). Maybe even calling it supported-min-sdk.

Copy link
Member

Choose a reason for hiding this comment

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

Yes I agree with that. We've been struggling to clearly define/separate

  1. the minimum version an app will run on constrained by technical means i.e. min-sdk, min libc etc.
  2. the minimum version we "officially" support which excludes EOL versions

The second one changes throughout a release as platforms go EOL but the first one we typically don't touch.

Similar discussion in #9038

Copy link
Contributor

@Falco20019 Falco20019 May 3, 2024

Choose a reason for hiding this comment

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

#8880 can give you a better picture about where this thing started off from. I will also need to know basically through-out the live of a .NET version what was supported in the past and might not be supported anymore. Right now, I maintain that stuff in a biiiiiiiiiiig table (#8880 (comment))

Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion, the information about OS EOLs should be maintained separatedly and since the JSON files are generated according to @leecow should be taken into account when generating these to not manually maintain them in multiple locations. Otherwise the supported-cycles would need to be kept in sync for all .NET channels on each EOL.

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 most important bit of data is supported OS, which aligns with "what we test and support". We should make sure that's captured. We've run into confusion in the past when we didn't have clarity on this.

What we target (with the compiler) is also important.

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 seems like #9294 (comment) is a compromise that gives everyone what they want. I'm not seeing an obvious downside to this approach. Yes/No?

"arm64"
],
"supported-cycles": [
"12.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect here the versions of 15+. 12.2 through 14.5 are already EOL. Maybe this is also something like a min-sdk version? I haven't used iOS builds myself so far. At least that seams to correspond to the SupportedOSPlatformVersion.

Copy link
Member

Choose a reason for hiding this comment

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

No, we still support iOS 12.2 as the minimum target an app can run on. It is similar to min-sdk on Android.

"architectures": [
"x64",
"arm64",
"arm"
Copy link
Member

Choose a reason for hiding this comment

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

x86 is also supported on Android

Copy link
Contributor

Choose a reason for hiding this comment

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

"arm"
],
"supported-cycles": [
"API 21+"
Copy link
Member

Choose a reason for hiding this comment

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

While what you wrote is correct we have been using the API version instead of the Android OS version pretty much everywhere else, and it it's also what a user would set for SupportedOSPlatformVersion in the project file.

I'd prefer if we use API version for consistency.

"arm64"
],
"supported-cycles": [
"12.2"
Copy link
Member

Choose a reason for hiding this comment

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

No, we still support iOS 12.2 as the minimum target an app can run on. It is similar to min-sdk on Android.

"arm64"
],
"supported-cycles": [
"15+"
Copy link
Member

Choose a reason for hiding this comment

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

We can't really sync with iOS here since we support earlier iOS versions than what Mac Catalyst supports, using 15.0+ is correct here since it really depends on the lowest macOS version we support and which Mac Catalyst version that one ships with (i.e. 15.0 because we support macOS 12.0)

"14",
"15",
"16",
"17"
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit confused why we use X.Y+ for one platform and explicitly list versions for other platforms.

In the current supported-os.md document we only specify the minimum platform version that we support running on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Mainly because of the mixup of min-sdk and supported-cycles so far. supported-cycles will change during the lifetime of a .NET version due to EOL, min-sdk will usually not change anymore and is also only one version not a full list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants