-
Notifications
You must be signed in to change notification settings - Fork 15
AS-1317 Upgrade Halogen to v6 #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
generic-rep is deprecated and merged into prelude with some module name changes.
`global` repo is deprecated and distributed to `js-uri` and `uri`. For our usage, `js-uri` is enough.
Following the upgrade guideline in the v6 changelog. See #subscriptions section for details.
Halogen.HTML.HTML is no longer needed to be specified in Halogen.Component type.
purescript 0.14 adds poly kind that enables unifying all proxy data types by one generic type Proxy so Halogen starts using that rather than SProxy.
Data.Map.Map no longer has Semigroup and Monoid instances which were considered biased by many people in the community. So since 2.0.0, the old behavior can be recovered by using the left biased Data.Map.union or Data.Map.SemigroupMap if the value has Semigroup instance. foldMap with Data.Map.singleton pattern no longer works.
The old Halogen.request and Halogen.tell are renamed to Halogen.mkRequest and Halogen.mkTell. New Halogen.request and Halogen.tell are specialized Halogen.query that save us some typing.
Action registry used to accept Nothing but no longer so. This applies to both Halogen.HTML.Events.* handlers and Halogen.HTML.slot. Use Halogen.HTML.slot_ if you don't need to register an Action to handle Output from child component.
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 |
From previous experiment, ncurses is available in the CI environment so it's not the problem. After some researching, I think it's the version of glibc being too old (2.24 but purescript installer needs 2.27). I see people upgrade glibc directly in Dockerfile like ENV GLIBC_VERSION 2.25-r0 but we are using a docker image from CircleCI. Let me try overwriting it by adding to `environment` variables.
276535a
to
d76b94b
Compare
So #!/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 |
Ok now we get the /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 |
CI fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! Changes look good to me!
Thanks for the review! |
What does this pull request do?
Upgrade
purescript
to0.14.1
and pin the new spago package set withhalogen
tov6.1.2
.Fix a bunch of breaking changes from various repos
generic-rep
is deprecated and mostly moved intoprelude
with some module name changesglobals
is deprecated and URI component encode/decode functions are moved tojs-uri
ordered-collections
moved left biasedSemigroup
andMonoid
instances fromData.Map.Map
to a new data-typeData.Map.SemigroupMap
(Safe.Coerce.coerce
could save the wrapping and unwrapping of newtype now so not too inconvenient, but new instances useunionWith append
instead ofunion
that requireSemigroup
instance on value too so it's not a drop-in replacement of the old instances)Where should the reviewer start?
One commit per breaking change.