Updating the Ecosystem for upcoming 0.14.0 release

#1

Due to Nate’s PolyKinds PR, a number of libraries will not compile in the upcoming 0.14.0 PureScript release. However, I helped Nate by updating each library that exists in the psc-0.13.6-20200127 package set, so that it would compile using his PR.

If you maintain or use one of the below libraries and want to help update the ecosystem in preparation for the upcoming 0.14.0 release, please follow the below instructions. I’m guessing it’ll still be a while until 0.14.0 gets released, but this will make the ecosystem breakage shorter.

Note: If you are the maintainer of one of these libraries and you get a PR to your master branch, please create a new branch (e.g. ps-0.14), retarget the PR to that branch, and merge it. You can then merge your new branch into your master branch once the next PS release is made.

Libraries Affected

Note: some of the below libraries compiled fine using Nate’s PR. However, I also removed deprecated syntax, so that we don’t get unneeded compiler warnings.

  • aff-bus (PR Submitted)
  • argonaut-codecs (PR Submitted)
  • arraybuffer-types (PR Submitted)
  • arraybuffer (PR Submitted)
  • arrays (PR Submitted)
  • bucketchain-simple-api (PR Submitted)
  • chirashi (can be dropped and added later)
  • choco-pie (can be dropped and added later)
  • foreign-object (PR Submitted)
  • halogen (PR Submitted)
  • halogen-formless (PR Submitted)
  • heterogeneous (PR Submitted)
  • identy (PR Submitted)
  • indexed-monad (PR Submitted)
  • jajanmen (can be dropped and added later)
  • json-schema (PR Submitted)
  • kancho (can be dropped and added later)
  • kishimen (can be dropped and added later)
  • money (PR Submitted)
  • naporitan (can be dropped and added later)
  • pathy (PR Submitted)
  • polyform (Ignore due to pending breaking changes)
  • proxying (PR Submitted)
  • querydsl (PR Submitted)
  • react-basic-hooks (PR Submitted)
  • react-basic (PR Submitted)
  • react (PR Submitted)
  • record-extra (PR Submitted)
  • record-format (PR Submitted)
  • record (PR Submitted)
  • routing-duplex (PR Submitted)
  • shoronpo (can be dropped and added later)
  • sijidou (can be dropped and added later)
  • simple-i18n (PR Submitted)
  • simple-json (PR Submitted)
  • st (PR Submitted)
  • struct (PR Submitted)
  • tolerant-argonaut (PR Submitted)
  • tortellini (can be dropped and added later)
  • type-isequal (PR Submitted)
  • typedenv (PR Submitted)
  • unordered-collections (PR Submitted)
  • variant (PR Submitted)
  • xiaomian (can be dropped and added later)

Instructions

# Note: if there are any issues with the below commands, 
# let me know so I can update this.

# 1. `git clone` my fork of the PureScript repo

git clone https://github.com/JordanMartinez/purescript.git
# or
git clone git@github.com:JordanMartinez/purescript.git

# 2. Checkout the `allChangesInOneCommit` branch
git checkout allChangesInOneCommit

# 3. Change the directory to your library 
# e.g. `cd test/support/.spago/halogen/`
cd tests/support/.spago/<libraryName>

# 4. Create a git repo in that folder
git init

# 5. Update the git remotes to refer to your repo (example below is Halogen)

git remote add origin https://github.com/slamdata/purescript-halogen.git
# OR
git remote add origin git@github.com:slamdata/purescript-halogen.git

# 6. Create a new branch
git checkout -b polykindsUpdate

# 7. Fetch the commit history from the repo
git fetch origin

# 8. Use a soft reset to put the current branch at the same place
# as the master branch
git reset --soft origin/master

# 8. Unstage all changes
# * = reset normal files 
# '.*' = reset hidden files (e.g. '.gitignore')
git reset HEAD * '.*'

# 9. Add and commit the changes I made
# Note: I only updated files in the `src/` folder. Files in the `test/` or
# `benchmark/` folders will need to be updated by you.
git add src/
git commit -m "Update library to compile on upcoming 0.14.0 PureScript release"

# 10. Push the changes to the repo
git push -u origin polykindsUpdate

# 11. Create a PR on GitHub that proposes merging `polykindsUpdate` into `master`

# 12. Wait until `0.14.0` PureScript release is made and all dependencies
# are updated. Then update your PR with any other changes before merging the PR.

# 13. Make a new release, so that other libraries that depend on yours can get updated quickly
8 Likes
#2

As an affected library author and just someone following along the Polykinds feature addition, just wanted to express a huge thank you for the effort you’ve put in to testing the whole PureScript package set against the feature and for making it easy on authors to update.

3 Likes
#3

I don’t plan to look at 0.14.0 changes soon, but of these libraries, someone can help update these:

  • simple-json
  • record-extra
  • type-isequal

These can be dropped from any package set, and readded later if needed:

  • chirashi
  • choco-pie
  • jajanmen
  • kancho
  • kishimen
  • naporitan
  • shoronpo
  • sijidou
  • tortellini
  • xiaomian

I think this long list of libraries that can be removed is only there because the current package-sets is based on my personal package set from before. This should make it easier to not have to look through as much

#4

I just tried following these instructions and found an issue in Step 6. I’ve updated the script to account for that issue (needed to unstage all files before I could add and commit src/ without bringing in other files in that commit).

I’ve also created and submitted a few PRs for a few of the libraries. I’ve updated the list to indicate which have been done already.

#5

I woke up super early today and couldn’t fall back asleep, so I figured I’d get more PRs submitted.

Since GitHub mentioned their new CLI tool yesterday, gh, I’ve been running gh pr create -w at the end of my workflow to automatically open a PR via my browser. It’s been working pretty well.

When I was submitting PRs for the following libraries, I noticed that other changes were being included. I’m guessing this is due to these libraries making changes in their master branch after the day the package set was last released or something. Once I’ve gone through and updated the other libraries, I can look at these again and see what I need to do to make them compile:

  • halogen
  • halogen-formless
  • json-schema
  • polyform
1 Like
#6

It’s perhaps worth noting that the Coercible change will require changes in some libraries too, specifically any types which need nominal roles for one or more of their parameters. The only specific example I can think of is Map, but there might be others.

#7

Mm… Good point. I had forgotten that the Coercible PR added that as well.

#8

@JordanMartinez thanks a lot for all your work related to this migration. Please don’t bother debugging polyform any more because I’ve pending breaking release of this library and I will use your previous suggestions to fix my master branch.

2 Likes
#9

Thanks for notifying me of that!

And it is my pleasure to serve the community.

1 Like
#10

I’ve submitted PRs for all packages except for json-schema and the ones that justin mentioned dropping and readding later. I did come across a problem with money, so that package might need to be updated as a whole.

#11

All PRs (other than the ones Justin said could be added later) have been submitted. It looks like we only have the following things to address:

  • improving the 13% performance regression Nate noted
  • making the polykinds PR work with the Coercible PR
  • updating any remaining libraries to use the new syntax from the Coercible PR.
3 Likes