Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

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

Open
SuperSandro2000 opened this issue Sep 28, 2024 · 8 comments
Open

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

SuperSandro2000 opened this issue Sep 28, 2024 · 8 comments
Labels
question Further information is requested

Comments

@SuperSandro2000
Copy link
Member

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

@SuperSandro2000 SuperSandro2000 added the question Further information is requested label Sep 28, 2024
@Gabriella439
Copy link

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
Copy link

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
Copy link
Member

phaer commented Oct 1, 2024

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

  • establish a dedicated team for it.
  • secure funding for additional builders.
  • ...and hopefully more, platform support for darwin is something we might be able to secure funding for the required labor itself?

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
Copy link
Member

getchoo commented Oct 2, 2024

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
Copy link

yu-re-ka commented Oct 6, 2024

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
Copy link
Member

roberth commented Oct 6, 2024

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
Copy link
Member

winterqt commented Oct 7, 2024

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
Copy link
Contributor

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.

@NixOS NixOS locked as resolved and limited conversation to collaborators Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants