Skip to content

Commit a3da7fb

Browse files
committed
Merge branch 'master' of https://github.com/commercialhaskell/stack into binary-module-interface
2 parents 60cc29b + 1c3245f commit a3da7fb

64 files changed

Lines changed: 1566 additions & 630 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ Where again, `<PATTERN>` is the name of the module without `Spec.hs`.
135135
Running the integration tests is a little involved, you'll need to:
136136

137137
```bash
138-
$ stack test stack:stack-integration-test --flag stack:integration-tests
138+
$ stack build --flag stack:integration-tests stack --interleaved-output --exec stack-integration-test
139139
```
140140

141141
Running an individual module works like this:
142142

143143
```bash
144-
$ stack test stack:stack-integration-test --flag stack:integration-tests --ta "-m <PATTERN>"
144+
$ stack build --flag stack:integration-tests stack --interleaved-output --exec "stack-integration-test -m <PATTERN>"
145145
```
146146

147147
Where `<PATTERN>` is the name of the folder listed in the
@@ -160,6 +160,39 @@ Where again, `<PATTERN>` is the name of the folder listed in the
160160
[test/integration/tests/](https://github.com/commercialhaskell/stack/tree/master/test/integration/tests)
161161
folder.
162162

163+
## CI Build rules
164+
165+
We use [Azure](https://dev.azure.com/commercialhaskell/stack/_build)
166+
to do CI builds on Stack. There are two types of build which happens
167+
there:
168+
169+
### Test suite build
170+
171+
This builds the code with `--pedantic`, performs hlint checks and it
172+
runs all test suites on multiple GHC/OS configuration. These are the
173+
rules for triggering it:
174+
175+
* CI will run this if commits are pushed to stable, master branch
176+
* CI will run this for any branches starting with `ci/`
177+
* CI will run this for all new PR's.
178+
179+
### Integration based build
180+
181+
This build runs the integration tests in the Stack codebase. This is
182+
scheduled to run daily once for both the stable and master branches.
183+
184+
Also, you can manually run this on a specific branch from the Azure UI
185+
if you have the appropriate permissions. If you'd specifically like a
186+
branch or PR to run integration tests, add a comment in the PR and we
187+
can queue one up.
188+
189+
190+
### Skipping build
191+
192+
There are times (like a minor type fix) where you don't want the CI to
193+
run. For those cases, you can add `[skip ci]` or `[ci skip]` in your
194+
commit message to skip the builds. For more details, [refer
195+
here](https://github.com/Microsoft/azure-pipelines-agent/issues/858#issuecomment-475768046).
163196

164197
## Slack channel
165198

ChangeLog.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ Major changes:
5555
builds, this functionality is no longer useful. For an example, please see
5656
[Building Haskell Apps with
5757
Docker](https://www.fpcomplete.com/blog/2017/12/building-haskell-apps-with-docker).
58+
* Support building GHC from source (experimental)
59+
* Stack now supports building and installing GHC from source. The built GHC
60+
is uniquely identified by a commit id and an Hadrian "flavour" (Hadrian is
61+
the newer GHC build system), hence `compiler` can be set to use a GHC
62+
built from source with `ghc-git-COMMIT-FLAVOUR`
5863

5964
Behavior changes:
6065
* `stack.yaml` now supports `snapshot`: a synonym for `resolver`. See [#4256](https://github.com/commercialhaskell/stack/issues/4256)
@@ -81,12 +86,33 @@ Behavior changes:
8186
* Always use the `--exact-configuration` Cabal configuration option when
8287
building (should mostly be a non-user-visible enhancement).
8388

89+
* No longer supports Cabal versions older than `1.19.2`. This means
90+
projects using snapshots earlier than `lts-3.0` or
91+
`nightly-2015-05-05` will no longer build.
92+
8493
* Remove the `stack docker cleanup` command. Docker itself now has
8594
[`docker image prune`](https://docs.docker.com/engine/reference/commandline/image_prune/)
8695
and
8796
[`docker container prune`](https://docs.docker.com/engine/reference/commandline/container_prune/),
8897
which you can use instead.
8998

99+
* Interleaved output is now turned on by default, see
100+
[#4702](https://github.com/commercialhaskell/stack/issues/4702). In
101+
addition, the `packagename> ` prefix is no longer included in
102+
interelaved mode when only building a single target.
103+
104+
* The `-fhide-source-paths` GHC option is now enabled by default and
105+
can be disabled via the `hide-source-paths` configuration option in
106+
`stack.yaml`. See [#3784](https://github.com/commercialhaskell/stack/issues/3784)
107+
108+
* Stack will reconfigure a package if you modify your `PATH` environment
109+
variable. See
110+
[#3138](https://github.com/commercialhaskell/stack/issues/3138).
111+
112+
* For GHC 8.4 and later, disable the "shadowed dependencies" workaround. This
113+
means that Stack will no longer have to force reconfigures as often. See
114+
[#3554](https://github.com/commercialhaskell/stack/issues/3554).
115+
90116
Other enhancements:
91117

92118
* Defer loading up of files for local packages. This allows us to get
@@ -160,7 +186,7 @@ Other enhancements:
160186
* Include default values for most command line flags in the `--help`
161187
output. See
162188
[#893](https://github.com/commercialhaskell/stack/issues/893).
163-
* environment variable `GHC_ENVIRONMENT` is set to specify dependency
189+
* Set the `GHC_ENVIRONMENT` environment variable to specify dependency
164190
packages explicitly when running test. This is done to prevent
165191
ambiguous module name errors in `doctest` tests.
166192
- Document the way stack interacts with the Cabal library.
@@ -181,6 +207,14 @@ Other enhancements:
181207
* User config files are respected for the script command. See
182208
[#3705](https://github.com/commercialhaskell/stack/issues/3705),
183209
[#3887](https://github.com/commercialhaskell/stack/issues/3887).
210+
* Set the `GHC_ENVIRONMENT` environment variable to `-` to tell GHC to
211+
ignore any such files when GHC is new enough (>= 8.4.4), otherwise
212+
simply unset the variable. This allows Stack to have control of
213+
package databases when running commands like `stack exec ghci`, even
214+
in the presence of implicit environment files created by `cabal
215+
new-build`. See
216+
[#4706](https://github.com/commercialhaskell/stack/issues/4706).
217+
* Use a database cache table to speed up discovery of installed GHCs
184218

185219
Bug fixes:
186220

@@ -233,6 +267,9 @@ Bug fixes:
233267
* When the Cabal spec version is newer than the global Cabal version, build
234268
against the snapshot's Cabal library. See
235269
[#4488](https://github.com/commercialhaskell/stack/issues/4488)
270+
- Docker: fix detection of expected subprocess failures. This fixes
271+
downloading a compatible `stack` executable when the host `stack` is not compatible with the Docker image (on Linux), and doesn't show an unnecessary
272+
extra error when the in-container re-exec'ed `stack` exits with failure.
236273

237274
## v1.9.3
238275

azure-pipelines.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
trigger:
2+
batch: true
3+
branches:
4+
include:
5+
- ci/*
6+
- master
7+
- stable
8+
19
variables:
210
BASE_BRANCH: "master"
311
CACHE_S3_PREFIX: "stack"

doc/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ It features:
1717

1818
#### How to install
1919

20-
For many Un*x operating systems, all you need to do is run:
20+
For most Un*x operating systems, the easiest way to install is to run:
2121

2222
curl -sSL https://get.haskellstack.org/ | sh
2323

@@ -28,9 +28,15 @@ or:
2828
On Windows, you can download and install the
2929
[Windows 64-bit Installer](https://get.haskellstack.org/stable/windows-x86_64-installer.exe).
3030

31-
For detailed instructions and downloads, including many additional
32-
operating systems, check out the
33-
[install and upgrade page](install_and_upgrade.md).
31+
For other operating systems and direct downloads, check out the
32+
[install and upgrade guide](install_and_upgrade.md).
33+
34+
Note that the [get.haskellstack.org](https://get.haskellstack.org/)
35+
script will ask for root access using `sudo` in order to use your
36+
platform's package manager to install dependencies and to install to
37+
`/usr/local/bin`. If you prefer more control, follow the manual
38+
installation instructions in the
39+
[install and upgrade guide](install_and_upgrade.md).
3440

3541
#### Quick Start Guide
3642

doc/developing_on_windows.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<div class="hidden-warning"><a href="https://docs.haskellstack.org/"><img src="https://cdn.jsdelivr.net/gh/commercialhaskell/stack/doc/img/hidden-warning.svg"></a></div>
2+
3+
# Developing on windows #
4+
5+
On Windows, Stack comes with an installation of
6+
[msys2](https://www.msys2.org/). Msys2 will be used by Stack to
7+
provide a unix-like shell for Stack. This may be necessary for installing some Haskell packages, such as those which use `configure` scripts.
8+
No
9+
matter which terminal you choose (cmd.exe, powershell, git bash or any
10+
other) you can use this environment too by executing all programs
11+
through `stack exec -- program`. This is especially useful if your
12+
project needs some additional tools during the build phase.
13+
14+
Executables and libraries can be installed with Pacman. All tools can
15+
be found [in the package
16+
list](https://github.com/msys2/msys2/wiki/Packages). A [list of
17+
commands](https://github.com/msys2/msys2/wiki/Using-packages) that
18+
work with Pacman is also available. Just remember that
19+
pacman&mdash;like all other tools&mdash;should be started with `stack
20+
exec -- pacman`.
21+
22+
## Setup.hs ##
23+
24+
`Setup.hs` is automatically run inside the stack environment. So when
25+
you need to launch another tool you don't need to prefix the command
26+
with `stack exec --` within the custom `Setup.hs` file.
27+
28+
## Pacman packages to install for common Haskell packages ##
29+
30+
The following lists Pacman packages known to allow the installation of
31+
some common Haskell packages on Windows. Feel free to submit
32+
additional entries via a pull request.
33+
34+
* For [text-icu](https://github.com/bos/text-icu) install `mingw64/mingw-w64-x86_64-icu`
35+
36+
## Cmake ##
37+
38+
Cmake has trouble finding other tools even if they are available on
39+
the `PATH`. Likely this is not a cmake problem but one of the
40+
environment not fully integrating. For example GHC comes with a copy
41+
of GCC which is not installed by msys itself. If you want to use this
42+
GCC you can provide a full path to it, or find it first with
43+
`System.Directory.findExecutable` if you want to launch GCC from a
44+
Haskell file such as `Setup.hs`.
45+
46+
Experience tells that the `mingw-w64` versions of make and cmake are
47+
most likely to work. Though there are other versions available through
48+
pacman, so have a look to see what works for you. Both tools can be
49+
installed with the commands:
50+
51+
```
52+
stack exec -- pacman -R mingw-w64-x86_64-make
53+
stack exec -- pacman -R mingw-w64-x86_64-cmake
54+
```
55+
56+
Even though make and cmake are then both installed into the same
57+
environment. Cmake still seems to have trouble to find make. To help
58+
cmake find GCC and make supply the following flags:
59+
60+
```
61+
-DCMAKE_C_COMPILER=path
62+
-DCMAKE_MAKE_PROGRAM=path
63+
```

doc/install_and_upgrade.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ or:
1010

1111
wget -qO- https://get.haskellstack.org/ | sh
1212

13-
Distribution packages are available for [Ubuntu](#ubuntu), [Debian](#debian),
14-
[Fedora](#fedora),
15-
[Arch Linux](#arch-linux) and [FreeBSD](#freebsd).
13+
14+
Note that this script will ask for root access using `sudo` in order
15+
to use your platform's package manager to install dependencies and to
16+
install to `/usr/local/bin`. If you prefer more control, follow the
17+
manual installation instructions for your platform below.
18+
1619
Binaries for other operating systems are listed below, and available on
1720
[the GitHub release page](https://github.com/fpco/stack/releases). For the
1821
future, we are open to supporting more OSes (to request one, please
@@ -249,7 +252,7 @@ or:
249252
* Extract the archive and place `stack` somewhere on your `$PATH` (see [Path section below](#path))
250253

251254
* Ensure you have required system dependencies installed. These include GCC, GNU make, xz, perl, libgmp, libffi, and zlib. We also recommend Git and GPG. To install these using your package manager:
252-
* Debian / Ubuntu: `sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg`
255+
* Debian / Ubuntu: `sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg netbase`
253256
* Fedora / CentOS: `sudo dnf install perl make automake gcc gmp-devel libffi zlib xz tar git gnupg` (use `yum` instead of `dnf` on CentOS and Fedora <= 21)
254257
* Fedora 24: In order to use `stack setup` on a 32-bit system, you may
255258
need to run `sudo dnf install ncurses-compat-libs`. If this package is
@@ -292,9 +295,9 @@ Run:
292295

293296
## Path
294297

295-
You can install stack by copying it anywhere on your PATH environment variable. We recommend installing in the same directory where stack itself will install executables (that way stack is able to upgrade itself!). On Windows, that directory is `%APPDATA%\local\bin`, e.g. "c:\Users\Michael\AppData\Roaming\local\bin". For other systems, use `$HOME/.local/bin`.
298+
You can install stack by copying it anywhere on your PATH environment variable. A good place to install is the same directory where stack itself will install executables. On Windows, that directory is `%APPDATA%\local\bin`, e.g. `c:\Users\Michael\AppData\Roaming\local\bin`. For other systems, it's `$HOME/.local/bin`.
296299

297-
If you don't have that directory in your PATH, you may need to update your PATH (such as by editing .bashrc).
300+
If you don't have that directory in your PATH, you may need to update your PATH (such as by editing `~/.bashrc`).
298301

299302
If you're curious about the choice of these paths, see [issue #153](https://github.com/commercialhaskell/stack/issues/153)
300303

0 commit comments

Comments
 (0)