upvote
It's not open source, really. Not anymore. A lot of the newer code added since the first versions of macOS is proprietary. A lot of the code signing and security subsystem is closed source, the APFS file system is too, most of the drivers are etc.

As for why a few parts remain open, it's probably just inertia. When OS X was new the open source/free software movement was at the peak of its hype cycle, many treated it as a locked in future, sort of how people talk about AI today. Kernel engineers in general were always pretty pro-open source, much moreso than GUI layer developers, and Linux was already available and growing fast. People believed that desktop Linux could be a competitive platform back then.

So as XNU was built on open source components like FreeBSD and Mach, I guess there was some internal fights between pro- and anti- open source camps. Jobs or someone else resolved it by saying it was OK to open source the low value / generic parts like the UNIX parts, but not the higher value userspace where macOS historically had competitive advantage. Then as the years passed this became just the way things are done, and nobody revisited it.

reply
It already starts at NeXT, as it was well known fact that they only based it on UNIX because they wanted the university market initially.

Also the Stepstone GCC based implementation of Objective-C frontend and language runtime were only begrudgingly contributed back to the project.

reply
Well, it is based on open source work like the Mach microkernel and parts of BSD. Not sure how easy it would be to make it closed-source now.

From what I remember, the original idea was to keep it open source so the community would take part in the review of UNIX-compliance, as an external party to ensure that Apple doesn't accidentally drift away too much.

But yeah, since it barely has any use outside of Apple products, I doubt that there is much power in the community to actually influence it...

reply
It's not GPL licensed. They could just not publish the source code anymore if they don't want to.
reply