citizennet / purescript-ocelot

An opinionated component library for Halogen apps
https://citizennet.github.io/purescript-ocelot/
Apache License 2.0
101 stars 15 forks source link

AS-1317 Upgrade Halogen to v6 #179

Closed boygao1992 closed 3 years ago

boygao1992 commented 3 years ago

What does this pull request do?

Upgrade purescript to 0.14.1 and pin the new spago package set with halogen to v6.1.2.

Fix a bunch of breaking changes from various repos

Where should the reviewer start?

One commit per breaking change.

boygao1992 commented 3 years ago

Hmm CI is not happy about the new compiler

[ SUCCESS ] Check if a prebuilt 0.14.1 binary is provided for linux (206ms)
[ SUCCESS ] Download the prebuilt PureScript binary (468ms)
[ FAILURE ] Verify the prebuilt binary works correctly
Error: Command failed: /home/circleci/ocelot/node_modules/purescript/purs.bin --version
/home/circleci/ocelot/node_modules/purescript/purs.bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/circleci/ocelot/node_modules/purescript/purs.bin)
/home/circleci/ocelot/node_modules/purescript/purs.bin: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/circleci/ocelot/node_modules/purescript/purs.bin)

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:189:13)
    at Pipe._handle.close (net.js:597:12)

Looks like something to do with this

boygao1992 commented 3 years ago

So ncurses is available in CI environemt.

#!/bin/bash -eo pipefail
sudo apt install libtinfo5 libncurses5-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libncurses5-dev is already the newest version (6.0+20161126-1+deb9u2).
libtinfo5 is already the newest version (6.0+20161126-1+deb9u2).
libtinfo5 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

CircleCI received exit code 0

The real problem should be the version of glibc. The docker image circleci/node:10.15-browsers we use is based on buildpack-deps:stretch (Debian 9) with glibc 2.24 but purescript 0.14.1 needs glibc 2.27. Going to try the -buster (Debian 10) image according to a similar issue reported on elm-format.

boygao1992 commented 3 years ago

Ok now we get the libtinfo issue as documented in the INSTALL.md

/home/circleci/ocelot/node_modules/purescript/purs.bin: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Going to add a step to install libtinfo and ncurses again.

boygao1992 commented 3 years ago

CI fixed.

boygao1992 commented 3 years ago

Thanks for the review!