Skip to content

Commit

Permalink
0.8.5 → 0.9.0 (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
f-f authored Jul 30, 2019
1 parent 11c5f33 commit 2d349cc
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 106 deletions.
72 changes: 66 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

Bugfixes:
- Fix `spago install` failing when version branch names differ only by case on case-insensitive filesystems (#258)
## [0.9.0] - 2019-07-30

Breaking changes (!!!):
- **Rename `package-set-upgrade` to `upgrade-set` (#336)**

You now have to call `spago upgrade-set` if you wish to upgrade your package-sets version

- **Move the `--jobs` flag to be global (#338)**

If you were invoking spago in this way: `spago install -j 10`, you now have to use `spago -j 10 install` instead

- **Import local packages `as Location` (#301, #244)**

Before you'd import a local package in this way:

```dhall
let additions =
{ foobar =
mkPackage
(../foobar/spago.dhall).dependencies
"../foobar"
"local-fix-whatever"
}
```

..but now you'll have to import it using `as Location` instead:

```dhall
let additions =
{ foobar = ../foobar/spago.dhall as Location }
```


New features:
- Add support for starting a repl within a folder which has not been setup as a spago project (#168)
- Add `--format` flag to `spago docs` (#294)
- Add `--no-config-format` global flag to skip formatting Dhall files during operations. (#300, #302)
- Add `bump-version` command, for generating `bower.json` files and making version tags in Git (#203)
- Add searchbar to docs generated with `spago docs` (#340, #333, #89)
- Add automatic migration of Bower projects when doing `spago init` (#159, #272, #342)
- Add `bump-version` command, for generating `bower.json` files and making version tags in Git (#203, #289, #324)
- Use `psa` for compiling if installed; you can avoid this with the new `--no-psa` flag (#305, #283, #252, #327)
- Add support for starting a repl within a folder which has not been setup as a spago project (#168, #280)
- Add `--format` flag to `spago docs` (#294, #299)
- Add project sources to `spago sources` output (#276, #287, #308)
- Watch all sources, including dependencies, when building with filewatch (#172, #309)
- Add `--deps-only` flag to build dependencies alone (#330, #331)

Bugfixes:
- Fix `spago install` failing when version branch names differ only by case on case-insensitive filesystems (#285)
- Change `--node-args` shortcut to `-a` to avoid clash (#292, #293)
- Stop reformatting config files if not necessary (#300, #302, #339)
- Make `spago run` write a file and execute it so that args are passed correctly (#297, #295)
- Add fallback for global cache directory (#314, #312)
- Do not overwrite `spago.dhall` when doing `spago init` twice (#318, #321)
- Catch exceptions when trying to fetch metadata (#325)
- Generate hashes when doing `psc-package-insdhall` (#337, #240)

Other Improvements:
- Curator: log exceptions to file to monitor eventual issues (#284)
- Docs: update README with newest features (#286)
- Docs: add docs about switching from Bower (#317)
- Errors: improve error message for overriding compiler version (#345, #343)
- Tests: improve failure messages (#298)
- Tests: fix `packages.dhall` fixtures manipulation (#307)
- Tests: add tests for the `list-packages` command (#304)
- Tests: add tests for local dependencies (#310)
- Config: remove `mkPackage` function in Dhall configs, and switch to package-sets releases for upstream (#322, #320, #319)
- Config: update test template to use `Effect.Class.Console` (#328, #334)
- CI: fix missing "commit since last release" message (#326)
- CI: add configuration for Mergify (#332)


## [0.8.5] - 2019-06-18

Expand Down
193 changes: 95 additions & 98 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,103 +12,6 @@ PureScript package manager and build tool powered by [Dhall][dhall] and

<img src="https://raw.githubusercontent.com/spacchetti/logo/master/spacchetti-icon.png" height="300px" alt="spacchetti logo">

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Design goals and reasons](#design-goals-and-reasons)
- [Brief survey of other package managers and build tools available](#brief-survey-of-other-package-managers-and-build-tools-available)
- [Developing and contributing](#developing-and-contributing)
- [Installation](#installation)
- [Super quick tutorial](#super-quick-tutorial)
- [How do I...](#how-do-i)
- [Switch from `psc-package`](#switch-from-psc-package)
- [Switch from `bower`](#switch-from-bower)
- [See what commands and flags are supported](#see-what-commands-and-flags-are-supported)
- [Download my dependencies locally](#download-my-dependencies-locally)
- [Build and run my project](#build-and-run-my-project)
- [Test my project](#test-my-project)
- [Run a repl](#run-a-repl)
- [List available packages](#list-available-packages)
- [Add a direct dependency](#add-a-direct-dependency)
- [Override a package in the package set with a local one](#override-a-package-in-the-package-set-with-a-local-one)
- [Override a package in the package set with a remote one](#override-a-package-in-the-package-set-with-a-remote-one)
- [Add a package to the package set](#add-a-package-to-the-package-set)
- [`bower link`](#bower-link)
- [Verify that an addition/override doesn't break the package set](#verify-that-an-additionoverride-doesnt-break-the-package-set)
- [Automagically upgrade the package set](#automagically-upgrade-the-package-set)
- [Separate `devDependencies` or test dependencies](#separate-devdependencies-or-test-dependencies)
- [Bundle a project into a single JS file](#bundle-a-project-into-a-single-js-file)
- [1. `spago bundle-app`](#1-spago-bundle-app)
- [2. `spago bundle-module`](#2-spago-bundle-module)
- [Skipping the Build Step](#skipping-the-build-step)
- [Make a project with PureScript + JavaScript](#make-a-project-with-purescript--javascript)
- [Generate documentation for my project](#generate-documentation-for-my-project)
- [Publish my library](#publish-my-library)
- [Use this together with `psc-package`](#use-this-together-with-psc-package)
- [Get all the licenses of my dependencies](#get-all-the-licenses-of-my-dependencies)
- [Know what `purs` commands are run under the hood](#know-what-purs-commands-are-run-under-the-hood)
- [Ignore or update the global cache](#ignore-or-update-the-global-cache)
- [Explanations](#explanations)
- [Visual Overview: What happens when you do 'spago build'?](#visual-overview-what-happens-when-you-do-spago-build)
- [Configuration file format](#configuration-file-format)
- [Why can't `spago` also install my npm dependencies?](#why-cant-spago-also-install-my-npm-dependencies)
- [Why we don't resolve JS dependencies when bundling, and how to do it](#why-we-dont-resolve-js-dependencies-when-bundling-and-how-to-do-it)
- [How does the "global cache" work?](#how-does-the-global-cache-work)
- [Troubleshooting](#troubleshooting)
- [I added a git repo URL to my overrides, but `spago` thinks it's a local path 🤔](#i-added-a-git-repo-url-to-my-overrides-but-spago-thinks-its-a-local-path-)
- [My `install` command is failing with some errors about "too many open files"](#my-install-command-is-failing-with-some-errors-about-too-many-open-files)
- [Package set caching problems](#package-set-caching-problems)
- [I added a new package to the `packages.dhall`, but `spago` is not installing it. Why?](#i-added-a-new-package-to-the-packagesdhall-but-spago-is-not-installing-it-why)
- [Reference - Internals](#internals)
- [The `spago-curator` tool](INTERNALS.md#the-spago-curator-tool)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->


## Design goals and reasons

Our main design goals are:
- **Great UX**: you're not supposed to spend your life configuring the build for your project.
A good build system just does what's most expected and gets out of the way so you can focus
on actually writing the software.
- **Minimal dependencies**: users should not be expected to install a myriad of tools on their
system to support various workflows. We depend only on `git` and `purs` being installed.
- **Reproducible builds**: thanks to [package sets][package-sets] and [Dhall][dhall], if your
project builds today it will also build tomorrow and every day after that.

Some tools that inspired `spago` are: [Rust's Cargo][cargo], [Haskell's Stack][stack],
[`psc-package`][psc-package], [`pulp`][pulp] and [`purp`][purp].


### Brief survey of other package managers and build tools available

`pulp` is excellent, but it is only a build tool. This means that you'll have to use it with
either `bower` or `psc-package`:
- If you go for `bower`, you're missing out on package-sets (that is: packages versions
that are known to be working together, saving you the headache of fitting package
versions together all the time).
- If you use `psc-package`, you have the problem of not having the ability of overriding
packages versions when needed, leading everyone to make their own package-set, which
then goes unmaintained, etc.

Of course you can use the package-set-local-setup to solve this issue, but this is
exactly what we're doing here: integrating all the workflow in a single tool, `spago`,
instead of having to install and use `pulp`, `psc-package`, `purp`, etc.


## Developing and contributing

We'd love your help, and welcome PRs and contributions!

Some ideas for getting started:
- [Build and run `spago`](CONTRIBUTING.md#developing-spago)
- [Help us fix bugs and build features](https://github.com/spacchetti/spago/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+label%3A%22defect%22)
- Help us improve our documentation
- Help us [log bugs and open issues][new-issue]

For more details see the [`CONTRIBUTING.md`][contributing]


## Installation

Expand Down Expand Up @@ -206,6 +109,100 @@ $ node .
```


<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Design goals and reasons](#design-goals-and-reasons)
- [Brief survey of other package managers and build tools available](#brief-survey-of-other-package-managers-and-build-tools-available)
- [Developing and contributing](#developing-and-contributing)
- [How do I...](#how-do-i)
- [Switch from `psc-package`](#switch-from-psc-package)
- [Switch from `bower`](#switch-from-bower)
- [See what commands and flags are supported](#see-what-commands-and-flags-are-supported)
- [Download my dependencies locally](#download-my-dependencies-locally)
- [Build and run my project](#build-and-run-my-project)
- [Test my project](#test-my-project)
- [Run a repl](#run-a-repl)
- [List available packages](#list-available-packages)
- [Add a direct dependency](#add-a-direct-dependency)
- [Override a package in the package set with a local one](#override-a-package-in-the-package-set-with-a-local-one)
- [Override a package in the package set with a remote one](#override-a-package-in-the-package-set-with-a-remote-one)
- [Add a package to the package set](#add-a-package-to-the-package-set)
- [`bower link`](#bower-link)
- [Verify that an addition/override doesn't break the package set](#verify-that-an-additionoverride-doesnt-break-the-package-set)
- [Automagically upgrade the package set](#automagically-upgrade-the-package-set)
- [Monorepo](#monorepo)
- [Bundle a project into a single JS file](#bundle-a-project-into-a-single-js-file)
- [1. `spago bundle-app`](#1-spago-bundle-app)
- [2. `spago bundle-module`](#2-spago-bundle-module)
- [Skipping the Build Step](#skipping-the-build-step)
- [Make a project with PureScript + JavaScript](#make-a-project-with-purescript--javascript)
- [Generate documentation for my project](#generate-documentation-for-my-project)
- [Publish my library](#publish-my-library)
- [Use this together with `psc-package`](#use-this-together-with-psc-package)
- [Get all the licenses of my dependencies](#get-all-the-licenses-of-my-dependencies)
- [Know which `purs` commands are run under the hood](#know-which-purs-commands-are-run-under-the-hood)
- [Ignore or update the global cache](#ignore-or-update-the-global-cache)
- [Explanations](#explanations)
- [Visual Overview: What happens when you do 'spago build'?](#visual-overview-what-happens-when-you-do-spago-build)
- [Configuration file format](#configuration-file-format)
- [Why can't `spago` also install my npm dependencies?](#why-cant-spago-also-install-my-npm-dependencies)
- [Why we don't resolve JS dependencies when bundling, and how to do it](#why-we-dont-resolve-js-dependencies-when-bundling-and-how-to-do-it)
- [How does the "global cache" work?](#how-does-the-global-cache-work)
- [Troubleshooting](#troubleshooting)
- [Spago is failing with some errors about "too many open files"](#spago-is-failing-with-some-errors-about-too-many-open-files)
- [Package set caching problems](#package-set-caching-problems)
- [I added a new package to the `packages.dhall`, but `spago` is not installing it. Why?](#i-added-a-new-package-to-the-packagesdhall-but-spago-is-not-installing-it-why)
- [Internals](#internals)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->


## Design goals and reasons

Our main design goals are:
- **Great UX**: you're not supposed to spend your life configuring the build for your project.
A good build system just does what's most expected and gets out of the way so you can focus
on actually writing the software.
- **Minimal dependencies**: users should not be expected to install a myriad of tools on their
system to support various workflows. We depend only on `git` and `purs` being installed.
- **Reproducible builds**: thanks to [package sets][package-sets] and [Dhall][dhall], if your
project builds today it will also build tomorrow and every day after that.

Some tools that inspired `spago` are: [Rust's Cargo][cargo], [Haskell's Stack][stack],
[`psc-package`][psc-package], [`pulp`][pulp] and [`purp`][purp].


### Brief survey of other package managers and build tools available

`pulp` is excellent, but it is only a build tool. This means that you'll have to use it with
either `bower` or `psc-package`:
- If you go for `bower`, you're missing out on package-sets (that is: packages versions
that are known to be working together, saving you the headache of fitting package
versions together all the time).
- If you use `psc-package`, you have the problem of not having the ability of overriding
packages versions when needed, leading everyone to make their own package-set, which
then goes unmaintained, etc.

Of course you can use the package-set-local-setup to solve this issue, but this is
exactly what we're doing here: integrating all the workflow in a single tool, `spago`,
instead of having to install and use `pulp`, `psc-package`, `purp`, etc.


## Developing and contributing

We'd love your help, and welcome PRs and contributions!

Some ideas for getting started:
- [Build and run `spago`](CONTRIBUTING.md#developing-spago)
- [Help us fix bugs and build features](https://github.com/spacchetti/spago/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+label%3A%22defect%22)
- Help us improve our documentation
- Help us [log bugs and open issues][new-issue]

For more details see the [`CONTRIBUTING.md`][contributing]


## How do I...

This section contains a collection of workflows you might want to use to get things done with `spago`
Expand Down Expand Up @@ -476,7 +473,7 @@ let additions =
}
```

Of course this works also in the case of adding local packages, which work exactly as the `overrides`:
As you might expect, this works also in the case of adding local packages:

Example:

Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: spago
version: 0.8.5.0
version: 0.9.0.0
github: "spacchetti/spago"
license: BSD3
author: "Justin Woo, Fabrizio Ferrai"
Expand Down
2 changes: 1 addition & 1 deletion src/Spago/Messages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pursVersionMismatch currentVersion minVersion = makeMessage
, "- if the `purs` version is 'too new', you can try using `spago upgrade-set` to upgrade to the latest package set"
, "- if you know what you're doing and you want to void this check, you can override the `version` of the `metadata` package in the packages.dhall:"
, ""
, " let overrides = { metadata = upstream.metadata { version = \"v" <> currentVersion <> "\" } }"
, " let overrides = { metadata = upstream.metadata // { version = \"v" <> currentVersion <> "\" } }"
, ""
]

Expand Down

0 comments on commit 2d349cc

Please sign in to comment.