NixOS / SC-election-2024

2024 Election for the Steering Committee
31 stars 75 forks source link

What is your plan on improving the darwin PR situtation? #97

Open SuperSandro2000 opened 1 month ago

SuperSandro2000 commented 1 month ago

Question

Right now ofborg often takes days to complete package builds for the darwin arches and it is unviable as a reviewer to wait for them to complete as they might never complete or just time out, so darwin builds are often with a bit of luck. Also if they fail, people are often clueless on how to fix the compiler/linker issues.

What are your ideas for that? Should darwin be demoted to tier 3? Should we try to find sponsors for new hardware?

Candidates I'd like to get an answer from

No response

Reminder of the Q&A rules

Please adhere to the Q&A guidelines and rules

Gabriella439 commented 1 month ago

So take these anecdotes with a grain of salt but at my current job and my last job Darwin support was a must and (as the team that supported Nix at work) we went to heroic lengths to help people get Darwin working and keep it working. For example, I personally worked on fixing linker issues on macOS at my current job so I'm acutely aware of how painful it is to keep macOS working.

If the problem were fixable with greater funding I'd argue we should lean on that because I'm pretty sure most Nix shops struggle with macOS support and would definitely pay for it to be in a much better position because they're already paying a lot in terms of their own devs working on debugging/supporting/working around Nix-on-macOS issues and they'd probably get a much better bang-for-their-buck paying the Nixpkgs contributors already working on and familiar with this territory.

tomberek commented 1 month ago

Darwin is popular, but requires additional resources and people focused on the problem. We should keep Darwin as a supported platform by funding additional hardware and finding personnel to focus on this portion of Nixpkgs. Concrete steps to take would be to establish a formal Darwin team who would manage provided funding for hardware and coordinate support via the infra team. This is part of an overall approach of establishing ownership of the problem as well as providing the necessary resources to solve it.

This is a problem to be solved for end-users and developers. So I would engage with organizations using Nix as a development tool on Darwin. They benefit from the ecosystem and thus also have some responsibility for its upkeep.

phaer commented 1 month ago

What are your ideas for that? Should darwin be demoted to tier 3? Should we try to find sponsors for new hardware?

We should not demote it, but

Using Nix for devshells & deployment tools on darwin seems to be common enough companies that I am optimistic that at least the builder situation is relatively easy to solve with a coordinated approach and some outreach.

Recent work also considerably helps with many of the SDK/toolchain woes darwin brought upon us.

getchoo commented 1 month ago

What are your ideas for that?

As someone with a little bit of experience in adding Darwin support to packages, the biggest blocker for me is the hardware. All of the PRs linked above were only possible to test on my end through a 2017 MacBook Air with a 1.8GHz, dual-core i5 I was given from a relative. It's as fun as you can probably imagine 😆

So one of my priorities here would be in providing access to Darwin hardware to contributors. The quickest way to do this would of course be Ofborg -- which we should still fund more Darwin machines for -- but given the massive demand it has, I would also want to give more resources to nix-community's Community builder program so people would have the opportunity to directly (and quickly) test changes. This would hopefully help ease the reliance on friends who are gracious enough to test PRs that I and other contributors have surely experienced

Further, I would encourage more community calls for maintainers and testers for Darwin (possibly under a NixOS/darwin-testers team?). The former has already shown to be quite effective, and I believe the latter would assist even further in the issue of contributors not being able to test and debug things properly as I mentioned above

Should darwin be demoted to tier 3?

No

Should we try to find sponsors for new hardware?

Most definitely. As interest grows in Nix, I believe there are many companies and organizations who would be interested in both using and growing our support for the platform in nixpkgs

yu-re-ka commented 1 month ago

There are definitely not enough people actively maintaining the darwin platform in Nixpkgs. Especially, I have rarely seen people who at the same time have the curiosity, motivation and energy to dig into the depths of nixpkgs in their free time, and also use Mac OS as their main operating system. They exist, but not enough to make up a foundation for a "tier 2" platform. In my opinion, this is the reason why the numerous community calls for maintainers have not yielded the increase in darwin maintenance. However, I am under the impression that a lot of darwin users are corporate/commercial users. My wish is a call for sponsoring not only hardware, but also work time. I would support the creation of a dedicated "darwin fund", and asking companies to give their employees dedicated paid time to work on nixpkgs darwin maintenance. I would make the demotion to tier 3 dependent on whether such a "darwin fund" yields sufficient new resources to alleviate the darwin maintenance problems.

roberth commented 1 month ago

We have ~80 darwin team members. That's too much to ping all at once, but I'm sure they've joined to be pinged nonetheless. This smells like a tooling or communication problem. A low tech solution may be to add them to meta.maintainers when the opportunity arises?

maintainers = [
  roberth
  # darwin maintainers:
  getchoo
];

That doesn't solve all the annoyances, but it could start to streamline the packages that have it, just by making clear who can help.

winterqt commented 1 month ago

Should darwin be demoted to tier 3?

Absolutely not. macOS support in Nixpkgs brings us a lot of users.

Lots of the problems you speak are pretty easy to fix (with the darwin-maintainers team a ping away), and most of these issues will go away with Randy's SDK rework and the default SDK version bump for x86_64-darwin (though the latter is for 25.05). macOS support is about to be in a very, very good place. :)

Should we try to find sponsors for new hardware?

Yes! However, do keep in mind that OfBorg is not ran by the foundation/the infra team at the moment; we would ideally want to fix this eventually, so that we can make these changes much easier than is currently possible.

proofconstruction commented 1 month ago

I'm sympathetic to the Nix-on-darwin use-case, and I occasionally use Nix on darwin myself, albeit frequently in anger. I'm typing this on an M1 iMac which does not have Nix installed, because a recent system update broke everything in hard-to-understand ways, and I ended up just wiping the machine instead of lose more time fighting with this. Demoting darwin would not be so much a political decision as a more honest reflection of the current situation: Apple doesn't care about the experience of users of their platform, beyond the use-cases envisioned by Apple, and even that's highly contentious. Darwin support is a nice-to-have in the same way that Windows support could be. In principle, we should be able to target these platforms without much additional maintenance, simply because - as I mentioned in my answer to #50 - we deserve a more capable Nix, for which the runtime platform for any package is abstracted away. Unfortunately, that's not today's reality, and supporting platforms other than x86_64-linux and aarch64-linux is both a distraction from other more important goals and a frustrating experience for users who expect better. The question is not so much "should we support non-Linux platforms?" (we should!) as "where should we allocate time/energy?", and I don't believe supporting darwin is a great use of the Foundation's limited resources.

With that said, and I believe this is a great opportunity for commercial partnership, as I've indicated in other answers. Plenty of businesses are all-in on darwin as a development platform, and I expect many would happily pay for this support. It is already the case that commercial users of Nix help to support Nix on darwin (e.g. the IOHK cache; thanks as always for hosting public infra!), and for some like Determinate Systems, darwin support is even an important component of the business strategy.