Skip to content

Commit

Permalink
Merge pull request #410 from JordanMartinez/development
Browse files Browse the repository at this point in the history
Make next major release: ps-0.13.x-v0.21.0
  • Loading branch information
JordanMartinez committed Nov 19, 2019
2 parents 7962f50 + a7f3560 commit 45bc24b
Show file tree
Hide file tree
Showing 58 changed files with 4,935 additions and 3,143 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ before_install:
# ^ Update NPM

install:
- npm i -g purescript@0.13.4 spago@0.9.0
- npm i -g purescript@0.13.5 spago@0.12.1
# ^ Use NPM to install most packages
- chmod +x .travis/spago--print-versions.sh
- ./.travis/spago--print-versions.sh
Expand Down
10 changes: 5 additions & 5 deletions 00-Getting-Started/02-Install-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ We can install everything using `npm`. However, getting `npm` is it's own proble

##### Manual Install

Justin Woo explains how to set up one's environment for the `0.12.x` release but has not been updated for two things. First, the PureScript release at the time was `0.12.0` but now `0.13.4` is out. Second, the instructions use `pulp` and `psc-package`, a different build tool workflow than the one we'll use here.
Justin Woo explains how to set up one's environment for the `0.12.x` release but has not been updated for two things. First, the PureScript release at the time was `0.12.0` but now `0.13.5` is out. Second, the instructions use `pulp` and `psc-package`, a different build tool workflow than the one we'll use here.

If you just want to get things set up ASAP, follow the below summary of his article's instructions (using `spago` instead of the other tools). If you want to understand why you should do these commands, read [his article here](https://qiita.com/kimagure/items/570e6f2bbce5b4724564):
1. Install Node 10 or greater: https://nodejs.org/en/download/
Expand All @@ -44,15 +44,15 @@ Unlike the manual install, `nvm` properly handles the npm prefix for you. So, yo

Once you have installed `npm`, we can use it to install everything in one command:
```bash
npm i -g purescript@0.13.4 spago@0.9.0 parcel
npm i -g purescript@0.13.5 spago@0.12.1 parcel
```

### Versions Used in this Project

The following commands should now work (the versions beside them are the versions I used when writing this project):
```bash
purs --version # 0.13.4
spago version # 0.9.0.0
purs --version # 0.13.5
spago version # 0.12.1.0
parcel --version # 1.12.0
```

Expand Down Expand Up @@ -83,7 +83,7 @@ The Atom package, `ide-purescript`, is configured to `Bower`, but we'll be using
3. Search for `ide-purescript`
4. Click on the `Settings` button in the entry that appears
5. Check the `Add spago sources` checkbox
6. Change the `build command` to: `spago build -- --json-errors`
6. Change the `build command` to: `spago build -u --json-errors`

### Getting IDE support (autocomplete, documentation-on-hover, etc.) in Atom

Expand Down
41 changes: 0 additions & 41 deletions 00-Getting-Started/03-The-REPL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,6 @@

REPL stands for Read, Evaluate, Print, Loop.

## Preparing a Folder for the REPL

In order to start the REPL, there are three requirements:
- a `packages.dhall` file exists in the current folder or one of its parents.
- a `spago.dhall` file exists in the current folder or one of its parents.
- the `psci-support` package has been installed (it appears in the the `spago.dhall` file's `dependencies` field).
- a `.purs-repl` file exists in the current folder or one of its parents. (Not an actual requirement for starting the REPL, but prevents issues a newcomer will otherwise encounter if they don't know anything about Purescript / FP languages.)

Follow these instructions to create a new project with these requirements:
```bash
# 1. Make a new directory
mkdir playground
# 2. Enter it
cd playground

# Note: the following commands will be explained more in the
# "Build-Tools" folder

# 3. Create a new Spago-based project
spago init

# 4. Install the psci-support package using this command:
spago install psci-support

# 5. Create the `.purs-repl` file that
# imports `Prelude` when the REPL starts:
echo "import Prelude" > .purs-repl

# 5. Build the project
spago build
```
You should now have a folder structure like the following:
```
playground\
.spago\
.psci-modules\
.purs-repl
packages.dhall
spago.dhall
```

## Starting the REPL

Use `spago repl`
Expand Down
6 changes: 3 additions & 3 deletions 00-Getting-Started/04-Other-Important-Info.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

If you decide to read the book, here are things to be aware of:
- be wary of any references to these [deprecated packages](https://github.com/purescript-deprecated)
- **Refer to [`dwhitney`'s fork of the book's code](https://github.com/dwhitney/purescript-book/tree/0.12)**, which is currently being updating to use `0.13.4`.
- **Refer to [`dwhitney`'s fork of the book's code](https://github.com/dwhitney/purescript-book/tree/0.12)**, which is currently being updating to use `0.13.5`.
- Refer to `Hello-World/Effect-and-Aff/Effect-Eff-and-Aff.md` to understand how to translate the no-longer-used `Eff` type to `Effect` type.

## Functional Programming Jargon
Expand Down Expand Up @@ -36,9 +36,9 @@ Then, you use a search query like the following:
- Anytime you need to look up the documentation for a package, use [Pursuit](http://pursuit.purescript.org/). Be aware that some of the deprecated packages mentioned above are still posted there.
- Use the [same instructions used by Hoogle](https://github.com/ndmitchell/hoogle/blob/master/README.md#chrome-integration) to add Pursuit as a search engine to your web browser.
- Read [Pursuit's Search Help page](https://pursuit.purescript.org/help/users#searching)
- Some libraries have not been updated to `0.13.4` and are still on the `0.11.7` release. Some still work; others won't. In this work, we will insure that you do not use any such libraries, but be aware of that if you browse the docs on your own.
- Some libraries have not been updated to `0.13.5` and are still on the `0.11.7` release. Some still work; others won't. In this work, we will insure that you do not use any such libraries, but be aware of that if you browse the docs on your own.
- Lastly, some libraries have not uploaded their latest versions' documentation. In these cases, we will forewarn you. Fortunately, `spago docs` will produce a local version of the source code's documentation that looks similar to Pursuit. It does not support all the features of Pursuit, but it's better than nothing. To do that, follow these commands:
- `spago docs && <your default web browser> generated-docs/html/index.html` where `<your default web browser` is `firefox` or whatever you use.
- `spago docs --open` will generate the documentation and then use your default web browser to open the file, `generated-docs/html/index.html`.

**Undocumented Pursuit Tip**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A way to use specific versions of libraries that are known to compile together w

## Why Use It?

`spago` only allows you to use dependencies that compile together on a specific PureScript release. You do not have to track down which version of a `DependencyA` to use to ensure it compiles when you also use `DependencyB`. Moreover, you don't have to verify that `DependencyA` at `v1.0.0` works on PureScript release `0.13.4` instead of `0.11.7`.
`spago` only allows you to use dependencies that compile together on a specific PureScript release. You do not have to track down which version of a `DependencyA` to use to ensure it compiles when you also use `DependencyB`. Moreover, you don't have to verify that `DependencyA` at `v1.0.0` works on PureScript release `0.13.5` instead of `0.11.7`.

When a new PureScript release with breaking changes occurs, using `bower` is painful until the ecosystem "catches up." Since a new release draws in a lot of people, their initial exploration of PureScript when using `bower` can be horrible.

Expand Down
2 changes: 1 addition & 1 deletion 02-Build-Tools/03-CLI-Programs--All-Options-Explained.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Documented version: `0.12.3`

## Spago (PureScript Build Tool & Dependency Manager)

Documented version: `0.9.0.0`
Documented version: `0.12.1.0`

![CLI Options: Spago (svg)](./assets/CLI-Options--Spago.svg)

Expand Down
7 changes: 4 additions & 3 deletions 02-Build-Tools/05-Spago--Project-Workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spago verify-set

### Freeze the Package Set

Note: Spago does this automatically now. So, one likely does not need to do this anymore. It is provided for context.
Note: Spago does this automatically now. So, one likely does not need to do this anymore. It is provided for context / historical purposes.
```bash
# 3) Freeze the package set to prevent security issues.
# For a deeper explanation on what happens here,
Expand All @@ -51,10 +51,11 @@ spago install packageName1 packageName2 # ...
spago repl

# Build the docs
spago docs
spago docs --open

# Automatically re-build project whenever a source/test file is changed/saved
spago build --watch
# and clear the screen before rebuilding
spago build --watch --clear-screen
```

## Build the Code
Expand Down
4 changes: 4 additions & 0 deletions 02-Build-Tools/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ The below image summarizes the current state:

![Build Tool Relationships "Build Tool Relationships"](./assets/Build-Tool-Relationships--With-Spago.svg)

### Phase 4: `Spago` becomes mainstream while `psc-package` is less used

Spago dropped support for `psc-package` commands in the `v0.11.0` release. `psc-package` is still usable and is more or less feature-complete. However, no further work on it will likely be done. Rather, Spago has become the main dependency manager when utilizing package-sets.

## Overview of Tools

| Name | Type/Usage | Comments | URL |
Expand Down

0 comments on commit 45bc24b

Please sign in to comment.