|
2026-05-07
| ||
| 11:40 | • Ticket [15181c4607] platform OS identifier changed from 'macosx-x86_64'... artifact: e31d0eb626 user: apnadkarni | |
| 10:57 | • Ticket [15181c4607]: 3 changes artifact: 46d21d13aa user: anonymous | |
| 10:40 | • Ticket [15181c4607]: 3 changes artifact: e8fb500081 user: jan.nijtmans | |
| 10:10 | • Ticket [15181c4607]: 4 changes artifact: a6e4f02822 user: oehhar | |
| 09:52 | • New ticket [15181c4607]. artifact: 264f17bb07 user: anonymous | |
[platform] OS identifier changed from 'macosx-x86_64' to 'macos-x86_64' in Tcl/Tk 9.0.3
After upgrading to Tcl/Tk 9.0.3, I noticed a change in the value returned by the platform::generic command on macOS.
Previous behavior (Tcl/Tk 9.0.1):
% package require platform
% platform::generic
=> macosx-x86_64
Current behavior (Tcl/Tk 9.0.3):
% package require platform
% platform::generic
=> macos-x86_64
The 'x' has been dropped from 'macosx', changing it to 'macos'.
This is a breaking change for any code that relies on string matching against the platform identifier (e.g., switch statements, package lookup paths, or conditional compilation logic based on the OS name).
Could you please clarify:
- Was this change intentional? If so, what motivated it?
- Is there a migration guide or compatibility shim available for code that relied on the old identifier?
- Going forward, should users expect this kind of identifier change to happen across minor or patch versions? Is there a stability guarantee for values returned by platform::generic and platform::identify?
Thank you for your time.
Il looks like a typo with fatal consequences...
It was done on purpose in [this] commit, because Apple rebranded MacOS X to MacOS starting with Darwin 16. See https://en.wikipedia.org/wiki/Darwin_(operating_system). Because of this change, the minor version of "platform" was updated to 1.1.
Because there was another branding change later (MacOS version > 10) and because of backward compatibility, MacOS (X) 10.x is still named "macosx" while MacOS > 10 will be named "macos".
My suggestion would be to adapt the regexp, making the "x" option. I don't think Apple will do a rebrand again.
Sorry for the inconvenience, but it was not a typo :-(
ok, thanks for clarifying that, I’ll update my package accordingly.
This isn't related to Tcl, but in my Homebrew installation, some Tcl packages are affected,
here is the list:
- critcl
- tcllib2.0/nettool/nettool.tcl
- tcllib2.0/practcl/practcl.tcl
Too late now, but for future reference I don't think the platform::generic value should change just because of a marketing rebrand, particularly the "generic" value. It should reflect the expected system API. It doesn't (and didn't) change for Windows 2000 -> Windows XP->Windows Vista->Windows 7 etc