| 24 Oct 2025 |
emily | other way around: the SDK has 14.4 | 01:23:52 |
emily | but darwin.AvailabilityVersions only generates for 14.3 | 01:23:59 |
emily | the include of AvailabilityInternalPrivate.h seems like a non-trivial difference, and relevantly they differ in terms of handling of the __SPI_AVAILABLE stuff…
darwin.AvailabilityVersions also creates an AvailabilityMacros.h that doesn't pull in TargetConditionals.h, while the SDK one does
| 01:24:06 |
Randy Eckenrode | adv_cmds gets rid of colldef. That’s not helpful. | 01:24:21 |
emily | anyway, like I said we can have functioning availability checks just by forwarding to the non-private ones (that's what the generated headers do in effect) | 01:24:26 |
Randy Eckenrode | Ah. That could be a bug in my script changes. | 01:24:33 |
emily | without shadowing all the other availability header stuff from the SDK | 01:24:36 |
emily | this is on nixpkgs-unstable, I could check your PR though | 01:24:47 |
emily | I'm just saying there are a fair few differences | 01:24:57 |
emily | AFAICT, the __SPI_AVAILABLE stuff is just identical to __API_AVAILABLE for internal stuff and defined away for external stuff | 01:25:44 |
emily | not sure why they do it in such a convoluted way given that but I guess it's what their scripts make convenient | 01:25:58 |
emily | also not sure why they define away the availability for internal stuff | 01:26:17 |
emily | * also not sure why they define away the availability for external stuff | 01:26:19 |
emily | not like it hides the definitions | 01:26:23 |
Randy Eckenrode | https://github.com/freebsd/freebsd-src/commit/c844ab67178719d956f1571f70bae84edc49cf72 | 01:29:08 |
Randy Eckenrode | I guess Apple is catching up changes from FreeBSD 11 …. | 01:29:15 |
emily | oh. I think I understand why SPI_AVAILABLE is defined away for public users | 01:33:41 |
emily | it seems like it's used to annotate things defined in the source releases, not system stuff | 01:34:46 |
emily | so __SPI_AVAILABLE(macos(15.0), …) just means "this wasn't in dyld before macOS 15.0", I guess (why that's useful I don't know) | 01:35:18 |
emily | when we're building the source releases ourselves it seems the public SDK behaviour of eliding those availability checks is exactly the correct thing | 01:35:48 |
emily | https://github.com/search?q=repo%3Aapple-oss-distributions%2Flibdispatch%20dispatch_time_from_nsec&type=code another example | 01:36:15 |
emily | so… all the darwin.AvailabilityVersions version of it would do is incorrectly mark stuff we're building as unavailable depending on SDK version, essentially | 01:37:10 |
Randy Eckenrode | It probably depends on whether we’re linking to the implementation in one of the source releases or to the symbol exported by the system in the SDK. | 01:37:19 |
emily | right | 01:37:28 |
emily | but I think this stuff is mostly not exported by the SDK? | 01:37:36 |
emily | because it's all stuff in private headers | 01:37:40 |
Randy Eckenrode | The symbols are. | 01:37:42 |
Randy Eckenrode | They’re in the text-based stubs. | 01:37:48 |
emily | right, ok, dispatch_time_from_nsec is there | 01:38:06 |
emily | it seems at least very contextual whether you'd want them to expand to availability checks | 01:38:16 |