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

Change platform code for "OSX" to "macOS" or similar #44120

Open
aaronfranke opened this issue Nov 1, 2020 · 13 comments
Open

Change platform code for "OSX" to "macOS" or similar #44120

aaronfranke opened this issue Nov 1, 2020 · 13 comments
Assignees
Labels
area-Meta os-mac-os-x macOS aka OSX packaging Related to packaging
Milestone

Comments

@aaronfranke
Copy link

aaronfranke commented Nov 1, 2020

Background and Motivation

The name "OSX" is no longer correct. The name "Mac OS X" has been deprecated since 2016 when Apple rebranded their Mac operating system to "macOS". However, in addition to this, the name "OSX" is now just flat out wrong, since the "X" stands for "10", but macOS Big Sur is version 11.0.

Proposed API

Renaming "OSX" and "osx" to either "macOS" or "MacOS" or "macos" or similar would solve this problem.

This proposal does not have specific signature requirements.

Usage Examples

N/A

Alternative Designs

"macOS" (stylized), "MacOS" (PascalCase), "macos" (lowercase), and "MACOS" (uppercase) are all similar designs that would be appropriate depending on the desired naming convention.

Risks

This would break compatibility, but wrappers and aliases can be kept as needed, and upgrading shouldn't be too big of an issue.

@aaronfranke aaronfranke added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Nov 1, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Nov 1, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@huoyaoyuan
Copy link
Member

#43313 (comment)

@joperezr joperezr removed the untriaged New issue has not been triaged by the area owner label Feb 9, 2021
@joperezr joperezr added this to the Future milestone Feb 9, 2021
@ghost ghost added the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Apr 4, 2021
@buyaa-n buyaa-n removed the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Apr 6, 2021
@iMonZ
Copy link

iMonZ commented May 7, 2021

This is very important for .NET 6.
"osx" could be the vintage x86 support
and "macOS" could be the new universal binary combined with arm64 and x86_64.
So please add this to the .NET 6 release so that the new macOS support is complete.
Could someone add this to the .NET 6 release log instead of "future"?

@ghost ghost added the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label May 7, 2021
@buyaa-n buyaa-n added the os-mac-os-x macOS aka OSX label May 12, 2021
@joperezr
Copy link
Member

@ericstj If we were to do this, would we need support for it from the NuGet or the SDK side or would it mostly just involve changes in our Microsoft.NETCore.Platforms package?

@joperezr joperezr added packaging Related to packaging and removed needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration labels May 13, 2021
@ericstj
Copy link
Member

ericstj commented May 13, 2021

WRT the RID graph: I believe we could either decide to make macos import osx or vice versa. We'd need to decide what we actually build for our portable mac builds or runtime packs and host and use that. I believe that's mostly within our control.

Next is defining those who synthesize RIDs: so host would need to change, probably build scripts. The SDK has a static list of known RIDs for the host and runtime packs that would need to change. Customer's building self-contained apps that want to target a portable Mac RID would also need to update (EG: osx-x64 -> macos-x64).

There's probably a ton of related stuff that would also need to change.


Perhaps we can ignore
[EditorBrowsable(EditorBrowsableState.Never)] MacOSX = 6,

We'd need to scrutinize every place that uses osx and decide what would be appropriate.

@wfurt @sdmaclea @richlander what's your thinking around this?

@ghost ghost added the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label May 13, 2021
@joperezr joperezr removed the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label May 13, 2021
@iMonZ
Copy link

iMonZ commented May 20, 2021

Can this issue be added to the .NET 6.0 milestone?

@joperezr
Copy link
Member

@iMonZ before we do that we want to see what does @richlander @terrajobst @wfurt @sdmaclea think about it and then we can start planning the work and see if it is feasible to have it in scope for 6.0.

@joperezr joperezr removed the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label May 20, 2021
@aaronfranke
Copy link
Author

@joperezr .NET 6 has been released. Can we have this done for .NET 7?

As a quick reminder, the longer we wait to do this, the more things are developed using the old name, which means that in general it becomes more difficult to change the name as time goes on.

@ghost ghost added the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Nov 13, 2021
@yaakov-h
Copy link
Member

FWIW at least, the SupportedOSPlatform analyser already treats the two interchangeably, so you can use [SupportedOSPlatform("macos")] today.

Also, macOS is now version 12, so X is two generations out of date.

@joperezr
Copy link
Member

@terrajobst thoughts?

@joperezr joperezr removed the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Nov 19, 2021
@jeffhandley
Copy link
Member

I'm going to put this into the .NET 7 milestone, and I'll connect with @ericstj and @terrajobst more on it. If we do move this forward, we'll need a pretty clear set of acceptance criteria to help us validate that the changes work throughout all end-to-end scenarios.

@jeffhandley jeffhandley self-assigned this Jan 5, 2022
@jeffhandley jeffhandley modified the milestones: Future, 7.0.0 Jan 5, 2022
@jeffhandley jeffhandley removed the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Jan 5, 2022
@ericstj
Copy link
Member

ericstj commented Jan 6, 2022

cc @eerhardt @vitek-karas

@terrajobst
Copy link
Member

terrajobst commented Jan 7, 2022

I'm not opposed to be doing this, but it would help to see a proposed design for this. Which enums would we need to introduce & hide, which checks would need be augmented?

Rough sketch:

Behavior changes

  • OperatingSystem.Platform would need to return PlatformID.MacOS on macOS (breaking change)
  • OperatingSystem.IsOSPlatform[AtLeast]("macOS") would return true on macOS
  • RuntimeInformation.IsOSPlatform(OSPlatform.MacOS) would return true on macOS

Hidden

  • PlatformID.MacOSX
  • OSPlatform.OSX

Added

  • PlatformID.MacOS
  • OSPlatform.MacOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta os-mac-os-x macOS aka OSX packaging Related to packaging
Projects
No open projects
Development

No branches or pull requests