purenix-org / purenix

Nix backend for PureScript. Transpile PureScript code to Nix.
https://hackage.haskell.org/package/purenix
BSD 3-Clause "New" or "Revised" License
295 stars 8 forks source link

bump to purescript-0.15 #50

Closed cdepillabout closed 2 years ago

cdepillabout commented 2 years ago

purescript-0.15 was released a few days ago. It would be nice if purenix was compatible with it. I'm not sure how much work would need to go into this:

https://github.com/purescript/purescript/releases/tag/v0.15.2

jonascarpay commented 2 years ago

It looks like purescript-cst is marked as broken upstream:

image

cdepillabout commented 2 years ago

@jonascarpay Ah, yeah, the stackage resolver used in purescript often lags behind the stackage resolver used in Nixpkgs. So Nixpkgs is now on LTS-19 / GHC-9.0, but I think purescript is still on LTS-18 / GHC-8.10. So it is sometimes difficult to keep purescript building in Nixpkgs.

However, there was recently a PR getting purescript building in Nixpkgs again. Some of the last few commits here are purescript-related: https://github.com/NixOS/nixpkgs/pull/175328. Although it is possibly only building in haskell.packages.ghc8107. I haven't really looked closely at this. You might be able to use one of the commits from that PR if you're looking to do this bump to purescript-0.15.

jonascarpay commented 2 years ago

You might be able to use one of the commits from that PR if you're looking to do this bump to purescript-0.15.

If I use the haskell-updates branch I get the same error, but for purescript-0.15.2. I guess we just wait until the issue is resolved upstream?

cdepillabout commented 2 years ago

@jonascarpay I think you have to explicitly get purescript from haskell.packages.ghc8107.

Here's what I just tried locally:

$ cd /path/to/my/nixpkgs/
$ git checkout haskell-updates
$ git pull
$ git rev-parse HEAD
1a2bb9918a9fcbe40a42f4bf0a17d571032fa933
$ nix-build -A haskell.packages.ghc8107.purescript
/nix/store/csz72sprx6k7f93vkvbyi26spfjfvwf7-purescript-0.15.2

So I imagine if you use nixpkgs at 1a2bb9918a9f, and make sure to switch all instances of haskellPackages to haskell.packages.ghc8107 in https://github.com/purenix-org/purenix/blob/main/nix/overlay.nix, purenix will build? Or you'll at least get everything up to purenix built.

jonascarpay commented 2 years ago

Just a quick update: I took another look at this, and currently, on both unstable and release-22.05, and on both haskellPackages and haskell.packages.ghc8107, the purescript library fails to build because bower-json is outdated.

The way I see it is we have two options;

Thoughts @cdepillabout ?

JordanMartinez commented 2 years ago

Not sure if it helps, but I thought I'd share this.

We're on GHC 9.2.3 now as of 0.15.4 using the nightly-2022-06-09 stackage release.

Also, we no longer use purescript-cst. That were merged into the purescript package during the 0.15.0 release.

jonascarpay commented 2 years ago

Thanks for the tip! Turns out GHC was still pinned to 8.10.7, everything builds with GHC 9. If tests pass I'll clean up the history and cut a release.