!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

684 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure135 Servers

Load older messages


SenderMessageTime
10 Feb 2025
@emilazy:matrix.orgemilyGHC is in the critical path for building a working Nixpkgs. the bootstrap pulls in an unsupported LLVM that doesn't build with modern compilers without patching and keeps requiring manual work to backport fixes. it has broken during recent staging cycles and it has fallen on Darwin maintainers to fix it because we cannot just ignore it. if there are substantive technical blockers to fixing this, then I want to work to address them. if there is a meaningful external userbase that relies on using those unsupported compilers with a supported Nixpkgs then I want to hear from them and discuss what the long-term options are. but it is a major burnout factor to have to repeatedly take responsibility for maintaining a codebase that we would rather be outside our purview because it very indirectly blocks the world and one maintainer can't decide what the reason it has to stay is17:33:32
@emilazy:matrix.orgemilyif a survey will settle the issue then I'll wait for a survey. but the reason there are still internal users is that it seems like a bad use of my time and energy when I get the feeling there'd be another reason even if static and RISC-V were solved and the survey got 1000 responses all saying they don't care about it17:34:41
@emilazy:matrix.orgemilyso instead I spend my time shepherding LLVM 12 fixes because I have no choice other than giving up on Darwin maintenance17:35:59
@emilazy:matrix.orgemilyfor the benefit of what may well be zero users who want to use old ghcjs on a fresh Nixpkgs release that is still over 3 months away17:36:36
@maralorn:maralorn.demaralorn sterni: I am currently not super motivated to do that survey. But what do you think about dusting of my deprecation proposal: https://md.darmstadt.ccc.de/FZwe_M9GQwWVnYfO0U4qJA (Would need a few updates.) The idea is still to announce it loud and wide and then people can complain, which I don’t expect them to do. The goal here is to give ourselves the permission to remove 8.10-9.2 if we can manage it. Of course we wouldn’t do it if we can’t manage building stuff like elm or bootstraping relevant configurations, but that’s orthogonal. No deprecation policy can force us to break our builds. This is just to unblock contributors like emily so that we are clear about internal and external requirements and expectations. 18:05:09
@rosscomputerguy:matrix.orgTristan Ross
In reply to @emilazy:matrix.org
GHC is in the critical path for building a working Nixpkgs. the bootstrap pulls in an unsupported LLVM that doesn't build with modern compilers without patching and keeps requiring manual work to backport fixes. it has broken during recent staging cycles and it has fallen on Darwin maintainers to fix it because we cannot just ignore it. if there are substantive technical blockers to fixing this, then I want to work to address them. if there is a meaningful external userbase that relies on using those unsupported compilers with a supported Nixpkgs then I want to hear from them and discuss what the long-term options are. but it is a major burnout factor to have to repeatedly take responsibility for maintaining a codebase that we would rather be outside our purview because it very indirectly blocks the world and one maintainer can't decide what the reason it has to stay is
Yeah, this is why I'm being kinda strict with removing LLVM 12. Less of a burden. And with the Darwin, really seems much more of a reason to remove it. We've basically got everything else except GHC off LLVM 12 so GHC is the last thing standing. It's the last release pre monorepo, doesn't get any patches.
19:19:13
@alexfmpe:matrix.orgalexfmpe
In reply to @maralorn:maralorn.de
sterni: I am here. I actually use ghcjs every day. I can tell you that we can drop it.
Also use it, also on said call and I'm with maralorn on this.
Kill it with fire, brimstone and extreme prejudice. Miso and reflex-dom now build with pkgsCross.ghcjs.haskell.packages.ghc912 on haskell-updates or open PRs to it
21:08:16
@alexfmpe:matrix.orgalexfmpeObsidian isn't even fussing over nixpkgs haskell, they adopted haskell.nix21:09:55
@alexfmpe:matrix.orgalexfmpeMiso does use nixpkgs haskell but they're also on a 2 years old and in the process of jumping directly to modern nixpkgs21:12:28
@alexfmpe:matrix.orgalexfmpeEr, modern nixpkgs for 9.12 ghc21:13:08
@ashinnv:matrix.orgMr Mayhem changed their display name from magnolia_mayhem to Mississippi_metalhead_mailman_magnolia_mayhem.21:47:39
@ashinnv:matrix.orgMr Mayhem changed their display name from Mississippi_metalhead_mailman_magnolia_mayhem to Mississippi_metalhead_mailman_maybe_magnolia_mayhem.21:48:24
@dmjio:matrix.org@dmjio:matrix.org

alexfmpe sterni I'm open to moving to the new JS backend, but last I checked there were some outstanding regressions in closure compilation that significantly affect payload size (maybe I'm out of date now?), and some new runtime errors that users were reporting (despite the fact that it builds). The original GHCJS (that miso caches) has a working GHCJSi, TH support, payloads amenable closure compilation, and the fewest runtime errors.

It seems the community has moved on to using an experimental build tool (flakes), a new compiler (which has introduced seemingly significant regressions for JS code output) and a new haskell package infra (haskell.nix), and has chosen to replace GHCJSi w/ the package jsaddle-warp and nixops is on life support.

Was considering the WASM backend as default instead because they support GHCi and TH now, but getting a proper nix derivation for it (it forks llvm to add a custom allocator -- maybe we should consider zig cc ?) to work with crossPkgs seems like a non-starter (according nix experts) and from my own experiments manually applying the ghc wasm patches to llvm in nixpkgs.

So the situation is less than ideal imo. In summary if the regressions can be addressed for the js closure compilation that would make me feel a little more comfortable, but I'd like to keep ghcjs around until feature parity is reached w/ the new JS backend.

21:54:57
@emilazy:matrix.orgemilydo you plan to update to Nixpkgs 25.05?22:00:47
@dmjio:matrix.org@dmjio:matrix.orgI would like to, ideally we could have a working build with the latest nixpkgs.22:04:58
@maralorn:maralorn.demaralorn dmjio: What exactly do you mean with "regressions in closure compilation"? 22:05:09
@maralorn:maralorn.demaralorn dmjio: Which libraries are you using? 22:05:52
@alexfmpe:matrix.orgalexfmpe9.10 payload sizes I think?22:05:51
@alexfmpe:matrix.orgalexfmpebut that build doesn't need to be 8.10 ghcjs right?22:08:37
@maralorn:maralorn.demaralornBy the way throwing flakes, the new js backend, haskell.nix, nixops and jsaddle-warp together sounds a bit like FUD to me. I get the sentiment, but no one is forcing you to use haskell.nix or flakes and this is all orthogonal to deployment. If you say, that you are currently using ghcjs in nixpkgs and that there are specific things missing for you to switch to the new backend, that is a very valuable data point.22:10:38
@dmjio:matrix.org@dmjio:matrix.org

maralorn: three things particular

  1. Linking (JS file concatenation) can cause OOMs (still) in CI servers - I think this has always been a problem though.
  2. The optimizer that typically runs was disabled (I'm not sure if they fixed that upstream, but modifications to it caused them to rethink)
  3. Closure compiler support stopped working and payload size got much larger
  4. Newer versions of nix don't work with miso's default version of nixpkgs ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
22:12:00
@dmjio:matrix.org@dmjio:matrix.org *

maralorn: three 4 things particular

  1. Linking (JS file concatenation) can cause OOMs (still) in CI servers - I think this has always been a problem though.
  2. The optimizer that typically runs was disabled (I'm not sure if they fixed that upstream, but modifications to it caused them to rethink)
  3. Closure compiler support stopped working and payload size got much larger
  4. Newer versions of nix don't work with miso's default version of nixpkgs ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
22:12:13
@dmjio:matrix.org@dmjio:matrix.org *

maralorn: three 4 things particular

  1. Linking (JS file concatenation) can cause OOMs (still) in CI servers - I think this has always been a problem though.
  2. The optimizer that typically runs was disabled (I'm not sure if they fixed that upstream, but modifications to it caused them to rethink)
  3. Closure compiler support stopped working and payload size got much larger
  4. Newer versions of nix don't work with miso's default version of nixpkgs on Darwin. ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
22:12:38
@dmjio:matrix.org@dmjio:matrix.orghttps://github.com/ghcjs/ghcjs/issues/821#issuecomment-112938836622:13:14
@alexfmpe:matrix.orgalexfmpe
  1. This is the thing that got disabled in 8.10 I believe. I seem to recall in #ghc-js-backend:matrix.org them telling me that thing in particular was still disabled, but a ton of other optimizations had been done that probably maked up for it
    One of the reasons I was getting miso-examples building in nixpkgs was to peek at the resulting sizes but I'm a bit confused on whether I have the right output due to some "undefined" errors when running.
    FWIW, here's what I got so far on my branch (no closure compiler AFAICT)
> l $(NIXPKGS_ALLOW_BROKEN=1 nix-build -A pkgsCross.ghcjs.haskell.packages.ghc912.miso-examples)/bin
total 110M
dr-xr-xr-x 1 root root  160 jan  1  1970 .
dr-xr-xr-x 1 root root   16 jan  1  1970 ..
-r-xr-xr-x 2 root root 9.3M jan  1  1970 canvas2d
-r-xr-xr-x 2 root root 9.6M jan  1  1970 compose-update
-r-xr-xr-x 2 root root 9.7M jan  1  1970 file-reader
-r-xr-xr-x 2 root root 9.7M jan  1  1970 mario
-r-xr-xr-x 2 root root 9.2M jan  1  1970 mathml
-r-xr-xr-x 2 root root  12M jan  1  1970 router
-r-xr-xr-x 2 root root  11M jan  1  1970 svg
-r-xr-xr-x 2 root root 9.4M jan  1  1970 threejs
-r-xr-xr-x 2 root root  11M jan  1  1970 todo-mvc
-r-xr-xr-x 2 root root  11M jan  1  1970 websocket
-r-xr-xr-x 2 root root  11M jan  1  1970 xhr
22:15:31
@maralorn:maralorn.demaralornkk. I know 1, I don’t know how problematic that is. 2. is not completely solved but the new backend is better than ghcjs 8.10 afaict. 3. I thought that closure compiler works with the new backend (see: https://blog.haskell.org/case-study-foreign-integration-js-browser/).22:15:33
@alexfmpe:matrix.orgalexfmpeso that's ~10MB pre closure compiler and pre-compression22:16:15
@alexfmpe:matrix.orgalexfmpewhich doesn't sound too big given I've reached 100MB on 8.10 at that stage hhe22:16:41
@alexfmpe:matrix.orgalexfmpe* which doesn't sound too big given I've reached 100MB on 8.10 at that stage heh22:16:45
@maralorn:maralorn.demaralornBut if 2. is really a problem for you, does that mean you are still on ghcjs 8.6? If yes, then you are currently not on a working nixpkgs and us dropping 8.10 wouldn’t make a difference, would it?22:16:56

Show newer messages


Back to Room ListRoom Version: 6