Spago 0.12 released 🎉

Another big release, many many thanks to all contributors! :heart:

As usual you can find it on NPM and in other places:

And if you find any problems with it don’t hesitate to open an issue

Note: we did publish 0.11 in the meanwhile, but it was broken because we tried out the static linking for Linux binaries - which didn’t work and we reverted for now.

Changelog

Breaking changes (:scream:!!!):

  • Remove psc-package -related commands (#423, #425)
    Since we are approaching a stable release and spago feature set is a superset of psc-package ones, from this release we do not support the commands to interop with psc-package :
    psc-package-local-setup , psc-package-insdhall and psc-package-clean commands.
  • Move all logging to stderr (#256, #475, #476, #486)
    All “business output” (e.g. spago sources ) will stay on stdout , so in practice everything
    should be fine, but this is theoretically a breaking change since someone might be depending
    on the output we had so far.

New features:

  • add support for spago build and spago run with alternate backends (#355, #426, #452, #435)E.g: add the key backend = "psgo" in spago.dhall to compile/run with psgo
  • add support for sharing the output folder in monorepos, to reduce build duplication.Pass --no-share-output flag to disable this behavior (#377, #422)
  • add new command spago path that returns the paths used in the project.E.g. spago path output returns the output path so that it can be shared with tools such as purs-loader . (#463)
  • spago docs now displays a link to the generated docs’ index.html , and opens them in the browser when passed the --open flag (#379, #421)
  • spago init has new --no-comments flag which skips adding tutorial comments to the generated spago.dhall and packages.dhall files (#417, #428)
  • spago verify-set now compiles everything, to detect duplicate module names. This can be disabled with --no-check-modules-unique (#438)
  • spago install purescript-XYZ will now strip purescript- prefix and install XYZ (if it exists in package set) instead of just failing with a warning (#367, #443)
  • spago run now allows to pipe stdin to your running project (#488, #490)

Bugfixes:

  • Fix Ctrl-C handling in REPL when using NPM installation on Windows (#493, #483)
  • Fix confusing warning when trying to spago install a package already present in project dependencies list (#436, #439)
  • Warn (but don’t error) when trying to --watch missing directories (#406, #420, #447, #448)
  • Do not watch files in .spago folder when running with --watch (#430, #446)
  • The --clear-screen flag (usable e.g. with spago build --watch ) now also resets cursor position, so the rebuild message always appears at top left of the screen (#465, #466)
  • Allow additional fields in the config for local packages (#470)
  • Fix --config option: get the correct paths when config file is in another directory (#478, #484)

Other improvements:

  • Tests: speed up test suite by replacing some end-to-end tests with unit/property tests (#445, #440)
  • Tests: update instructions to run tests (#449)
  • Tests: always run test suites with UTF8 encoding (#482)
  • Docs: various improvements to README (#432, #457, #464, #487)
  • Docs: add “getting started” guides for Parcel, Webpack and Nodemon (#456, #461, #473)
  • Errors: improve cache skipping error (#453, #480, #481)
  • Errors: add a nice error message when trying to run spago test with no test modules (#489, #383, #492)
  • Refactor: fix hlint warnings (#450)
  • Refactor: rewrite Curator for moar maintainability (#458, #419)
  • Deps: update to Dhall 1.27 and Purs 0.13.4 (#469)
  • Deps: revert to GHC 8.4.4 and LTS-12 (#479)
  • CI: fix release code (#494, #495)
8 Likes

I start feeling like a trouble maker, but I got issues also with this release:

:sob:

Oh sorry, that’s just me breaking the release code :smile:

Fix up here and I’ll cut a new release in the next hours

1 Like

Just released 0.12.1 which should fix this :blush:

The new release works fine; THANKS.

Only trivial observation so far is about the version number (there is trailing ‘.0’ too much):

$ spago version
0.12.1.0

You’re welcome!

The version number mismatch comes from the fact that we’re sharing the version number between NPM (which uses 3 numbers for the version) and the Haskell package (which uses 4). We’ll eventually unify them, it’s just that no one tackled this yet :slightly_smiling_face:

1 Like

Is there anything which would make this more difficult than using the same version in the Haskell package as you are using in the NPM package? Haskell packages are allowed to have 3 components; this is what we do in the compiler.

Everything should be straightforward, but some care needs to be put so that we don’t break the publishing flow: we’d like to have the version number only in one place (the package.yaml file), and derive the NPM version from there; to do that we have some scripts and we’d need to check they don’t break when we drop the fourth component

1 Like

I’m really loving the shared output folder. It sped up my learning repo’s compilation dramatically!

2 Likes