[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/purescript/trypurescript/master/RELEASE.md [Back]  [Original]

# Release

## Instructions for Redeploying Try PureScript

After making a new compiler release, do the following to redeploy Try PureScript using the new compiler.

1. Submit a PR with the following changes:
    - In `stack.yaml`,
      - update the `resolver` to match the same one used in the PureScript repo
      - update `purescript` to use its new version.
    - Update the package set (see next section's instructions).
    - Update the shared config by running `cd client && npm run updateConfigVersions`.
    - Update the changelog to include the next release's date.
2. Once the PR is merged, create a new GitHub tagged release using `vYYYY-MM-DD.X` (where `X` is usually `1` or the release attempt) as the version schema. The release will trigger a GitHub Actions build.
3. Wait for the GitHub Actions build to finish (it builds the assets)
4. Run `./deploy/run.sh vX-X-X.1`, replacing `vX-X-X.1` with the version you created.

## Updating the Package Set

The try.purescript.org server only has a limited amount of memory. If the package set we use in deployment is too large, the server will run out of memory.

Before deploying an updated package set, someone (your reviewer) should check that the memory required to hold the package set's externs files does not exceed that of the try.purescript.org server.

To check, run the server locally from `staging/` with the production RTS flags (see `deploy/start`) plus `-s`, which prints a heap summary when the server exits:

```console
$ cd staging
$ rm -rf .psci_modules   # start cold: the server's compilation cache
$ (set -o noglob && stack exec trypurescript -- +RTS -N2 -A128m -M3G -s -RTS 8081 $(spago sources))
```

Cold boot compiles the whole set, which takes a few minutes. Once the server responds on port 8081, stop the server with Ctrl-C and you should see a summary printed on exit. The number to watch is `bytes maximum residency`. You'll have to run this a _second time_, keeping the `.psci_modules` that the first run produced, to measure the peak memory usage (warm boot has higher max live heap than cold boot without cache).

Update the package set by doing the following. Each step is explained below:

### Summary

```sh
pushd staging
cat > spago.yaml 

Web Proxy Viewer  |  New URL  |  Original Page