Understanding package versions

#149 · open · 1 comments

View on GitHub ↗

Willmo36

Hey there, I've `psc-package install react-basic`'d in order to try out the [react-basic counter example](https://github.com/lumihq/purescript-react-basic/tree/master/examples/counter) and there seems to be a mismatch of version. The current `psc-package set` has `react-basic` at [version 6.2.0](https://github.com/purescript/package-sets/blob/master/packages.json#L1625) which I believe is below the version used in their example and causing me some grief with the example code. How (if even possible) would I get resolve this using `psc-package`? My impression is the version of `react-basic` is locked down to the package set itself. Also, [spacchetti has v8.0.0 of react-basic](https://github.com/spacchetti/spacchetti/blob/master/packages.json#L1517). I'm not sure what this implies regarding the lifecycle of a package set or the status of `psc-package` itself (as in, should I be using spacchetti instead?). Thanks for all your efforts on this project!

Comments

justinwoo

`spacchetti` is an alternative to `package-sets` that I personally manage, but I also manage `package-sets` from community contributions. It is not an alternative to `psc-package`, as it is only a package set. To get a specific version of react-basic, you have four options: 1. Like you have pointed out, spacchetti has 8.0.0 in master. You can consume the tag that has this: https://github.com/spacchetti/spacchetti/releases/tag/20190131. See https://spacchetti.readthedocs.io/en/latest/ for more details. 2. You can fork package-sets to add what you want. See https://psc-package.readthedocs.io/en/latest/maintenance.html. You should try to upstream your changes here. 3. You can use the `spago` tool and patch the package in the package set, using a language called Dhall: https://github.com/spacchetti/spago 4. You can use the `spago` tool to create a custom package set for consuming with psc-package: https://spacchetti.readthedocs.io/en/latest/local-setup.html Most users will be able to just use (1) and continue without any further problems.