Filter by Purescript version in Pursuit?.. or other ways of dealing with 'old' libraries?

I am in progress with reading the very nice purescript book called “Functional programming made easier” and for most of the book it has been easy to implement the code from the book, however in the later half of the book I am finding that the book uses a lot of ‘old’ libraries which seems incompatible with the latest purescript versions. The book seems to use libraries which fit for version 0.14, but I have been using 0.15.x versions all the time. So when trying to use libraries that the book suggests, I’ll get errors like this one:

$ spago install crypto
[error] The following packages do not exist in your package set:
[error]   - crypto

… which is alright, because that’s an opportunity for me to learn to find my way around Pursuit on my own without the book holding my hands.

However, in my searches on Pursuit I sometimes end up on other ‘outdated’ libraries, for example this one purescript-simplecrypto - Pursuit which also seems to be incompatible with purescript 0.15.x.

So I am wondering if there is a way to filter packages when searching on Pursuit such that I only get packages that are directly compatible with Purescript 0.15.x?
… Or alternatively, if I am supposed to do something else with old packages? For example if there is some easy way to introduce a given ‘old’ package to the ‘package set’ and then install it.
(I did attempt something like that a while ago with another library, but got frustrated and impatient and gave up, -and simply found an alternative)

No. However, all core, contrib, web, and node libraries should be compatible with the following PureScript releases: 0.13.x, 0.14.x, and 0.15.x.

Or alternatively, if I am supposed to do something else with old packages? For example if there is some easy way to introduce a given ‘old’ package to the ‘package set’ and then install it.

See the docs on this: GitHub - purescript/spago: 🍝 PureScript package manager and build tool powered by Dhall and package-sets

2 Likes

When working with 0.14 and the 0.15 libraries are the most recent, you can simply use the dropdown menu to go to a previous version, e.g. if the current version of a library is 8.1.0, then I’ll go NOT to 8.0.0 but 7.x.x. Typically a major version change is sufficient to find the documentation you need for those libraries.

This is a pain and I wish there was a way to get around this like you can in Haskell, but it just hasn’t been made a priority by the community.

I suspect as more and more people use PS, it’ll become more of an issue.