Skip to content

Commit

Permalink
Merge branch 'master' into sig-sign-sdist-and-upload-sign
Browse files Browse the repository at this point in the history
* master: (106 commits)
  Fix ghci -package-id for lib dep from test #1222
  Fix passing of include dirs to GHCI #1222
  Minor change to some local var naming
  Fix a copy-o which breaks ghci test targets #1222
  Only ask for commit count once when compiling
  Move Windows installers above manual download
  Import all modules after loading them (#995)
  replace if then else with case matching (multiway if)
  Control/Concurrent/Execute.hs : redundant do
  Use stack setup so you can ignore most of the output
  Don't cache the GHC folder
  Strip -static before passing to GHCi (#1094)
  Fix: unlisted files in tests and benchmarks trigger extraneous second build (fixes #838)
  Don't fail when registering/looking up library for executable-only packages #1232
  Fix help for default true bool flag's enable hint
  Rebuild when cabal file is changed
  watched command: show files, not directories
  Update changelog
  Fix: Haddocks not copied for dependencies (fixes #1105)
  Remove redundant Version from InstalledMap
  ...
  • Loading branch information
dysinger committed Oct 28, 2015
2 parents 3da50d0 + d2a195a commit 57d787e
Show file tree
Hide file tree
Showing 76 changed files with 2,351 additions and 1,284 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ tags
*.imports
/.idea/
/*.iml
/src/highlight.js
/src/style.css
25 changes: 24 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,28 @@

Major changes:

* "stack setup" now supports building and booting GHCJS from source tarball.
* GHCJS can now be used with stackage snapshots.
* Windows installers are now available:
[download them here](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#windows) [#613](https://github.com/commercialhaskell/stack/issues/613)

Other enhancements:

* Added an `allow-newer` config option [#922](https://github.com/commercialhaskell/stack/issues/922) [#770](https://github.com/commercialhaskell/stack/issues/770)
* When a Hackage revision invalidates a build plan in a snapshot, trust the snapshot [#770](https://github.com/commercialhaskell/stack/issues/770)
* Added a `stack config set resolver RESOLVER` command. Part of work on [#115](https://github.com/commercialhaskell/stack/issues/115)
* `stack setup` can now install GHCJS on windows. See [#1145](https://github.com/commercialhaskell/stack/issues/1145) and [#749](https://github.com/commercialhaskell/stack/issues/749)
* `stack hpc report` command added, which generates reports for HPC tix files

Bug fixes:

* Haddocks not copied for dependencies [#1105](https://github.com/commercialhaskell/stack/issues/1105)
* Rebuild when cabal file is changed

## v0.1.6.0

Major changes:

* `stack setup` now supports building and booting GHCJS from source tarball.
* On Windows, build directories no longer display "pretty" information
(like x86_64-windows/Cabal-1.22.4.0), but rather a hash of that
content. The reason is to avoid the 260 character path limitation on
Expand Down Expand Up @@ -31,6 +52,8 @@ Other enhancements:
* Docker: when Docker Engine is remote, don't run containerized processes as host's UID/GID [#194](https://github.com/commercialhaskell/stack/issues/194)
* Docker: `set-user` option to enable/disable running containerized processes as host's UID/GID [#194](https://github.com/commercialhaskell/stack/issues/194)
* Custom Setup.hs files are now precompiled instead of interpreted. This should be a major performance win for certain edge cases (biggest example: [building Cabal itself](https://github.com/commercialhaskell/stack/issues/1041)) while being either neutral or a minor slowdown for more common cases.
* `stack test --coverage` now also generates a unified coverage report for multiple test-suites / packages. In the unified report, test-suites can contribute to the coverage of other packages.
* --fast turns off optimizations

Bug fixes:

Expand Down
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ It features:

Downloads are available by operating system:

* [Windows](doc/install_and_upgrade.md#windows)
* [OS X](doc/install_and_upgrade.md#os-x)
* [Ubuntu](doc/install_and_upgrade.md#ubuntu)
* [Debian](doc/install_and_upgrade.md#debian)
* [CentOS / Red Hat / Amazon Linux](doc/install_and_upgrade.md#centos--red-hat--amazon-linux)
* [Fedora](doc/install_and_upgrade.md#fedora)
* [Arch Linux](doc/install_and_upgrade.md#arch-linux)
* [NixOS](doc/install_and_upgrade.md#nixos)
* [Linux (general)](doc/install_and_upgrade.md#linux)

[Upgrade instructions](doc/install_and_upgrade.md#upgrade)
* [Windows](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#windows)
* [Mac OS X](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#mac-os-x)
* [Ubuntu](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#ubuntu)
* [Debian](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#debian)
* [CentOS / Red Hat / Amazon Linux](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#centos--red-hat--amazon-linux)
* [Fedora](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#fedora)
* [Arch Linux](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#arch-linux)
* [NixOS](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#nixos)
* [Linux (general)](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#linux)

[Upgrade instructions](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#upgrade)

Note: if you are using cabal-install to install stack, you may need to pass a
constraint to work around a
Expand Down Expand Up @@ -138,13 +138,13 @@ stack build
#### Complete guide to stack

This repository also contains a complete [user guide to using stack
](doc/GUIDE.md), covering all of the most common use cases.
](https://github.com/commercialhaskell/stack/blob/release/doc/GUIDE.md), covering all of the most common use cases.


#### Questions, Feedback, Discussion

* For frequently asked questions about detailed or specific use-cases, please
see [the FAQ](doc/faq.md).
see [the FAQ](https://github.com/commercialhaskell/stack/blob/release/doc/faq.md).
* For general questions, comments, feedback and support please write
to [the stack mailing list](https://groups.google.com/d/forum/haskell-stack).
* For bugs, issues, or requests please
Expand Down Expand Up @@ -178,27 +178,27 @@ can address these concerns.
## Documentation Table Of Contents

* Project Documentation
* [Maintainer Guide](doc/MAINTAINER_GUIDE.md): includes releasing information
* [Signing Key](doc/SIGNING_KEY.md): downloadable stack binaries are signed
* [Maintainer Guide](https://github.com/commercialhaskell/stack/blob/release/doc/MAINTAINER_GUIDE.md): includes releasing information
* [Signing Key](https://github.com/commercialhaskell/stack/blob/release/doc/SIGNING_KEY.md): downloadable stack binaries are signed
with this key
* Tool Documentation
* [Build Command](doc/build_command.md): reference for the syntax of the
* [Build Command](https://github.com/commercialhaskell/stack/blob/release/doc/build_command.md): reference for the syntax of the
build command and the command line targets
* [Dependency Visualization](doc/dependency_visualization.md): uses Graphviz
* [Docker Integration](doc/docker_integration.md)
* [FAQ](doc/faq.md): frequently asked questions about detailed or specific
* [Dependency Visualization](https://github.com/commercialhaskell/stack/blob/release/doc/dependency_visualization.md): uses Graphviz
* [Docker Integration](https://github.com/commercialhaskell/stack/blob/release/doc/docker_integration.md)
* [FAQ](https://github.com/commercialhaskell/stack/blob/release/doc/faq.md): frequently asked questions about detailed or specific
use-cases
* [Install/Upgrade](doc/install_and_upgrade.md): a list of downloads
* [Install/Upgrade](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md): a list of downloads
available by operating system, installation instructions, and upgrade
instructions
* [Nonstandard Project Initialization](doc/nonstandard_project_init.md)
* [Shell Autocompletion](doc/shell_autocompletion.md)
* [User Guide](doc/GUIDE.md): in-depth tutorial covering the most common use
* [Nonstandard Project Initialization](https://github.com/commercialhaskell/stack/blob/release/doc/nonstandard_project_init.md)
* [Shell Autocompletion](https://github.com/commercialhaskell/stack/blob/release/doc/shell_autocompletion.md)
* [User Guide](https://github.com/commercialhaskell/stack/blob/release/doc/GUIDE.md): in-depth tutorial covering the most common use
cases and all major stack features (requires no prior Haskell tooling
experience)
* [YAML Configuration](doc/yaml_configuration.md): reference for writing
* [YAML Configuration](https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md): reference for writing
`stack.yaml` files
* Advanced Documentation
* [Architecture](doc/architecture.md): reference for people curious about
* [Architecture](https://github.com/commercialhaskell/stack/blob/release/doc/architecture.md): reference for people curious about
stack internals, wanting to get involved deeply in the codebase, or
wanting to use stack in unusual ways
11 changes: 4 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
cache:
- "c:\\sr" # stack root, short paths == less problems
- "%LOCALAPPDATA%\\Programs\\stack"

build: off

before_test:
- ps: Invoke-WebRequest "https://github.com/commercialhaskell/stack/releases/download/v0.1.4.0/stack-0.1.4.0-x86_64-windows.zip" -OutFile stack.zip
- ps: Invoke-WebRequest "https://github.com/fpco/minghc/blob/master/bin/7z.exe?raw=true" -OutFile 7z.exe
- ps: Invoke-WebRequest "https://github.com/fpco/minghc/blob/master/bin/7z.dll?raw=true" -OutFile 7z.dll
- 7z x stack.zip
- move stack.exe.exe stack.exe
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe

clone_folder: "c:\\stack"
environment:
global:
STACK_ROOT: "c:\\sr"

test_script:
- stack setup > nul
# The ugly echo "" hack is to avoid complaints about 0 being an invalid file
# descriptor
- echo "" | stack --arch i386 --no-terminal --install-ghc test
- echo "" | stack --no-terminal test
2 changes: 1 addition & 1 deletion doc/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v0.1.4.0/stack-0.1.4.0-x86_64-linux.tar.gz | tar xz -C ~/.local/bin
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# This line does all of the work: installs GHC if necessary, build the library,
# executables, and test suites, and runs the test suites. --no-terminal works
Expand Down
156 changes: 126 additions & 30 deletions doc/MAINTAINER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,134 @@
## Pre-release checks

The following should be tested minimally before a release is considered good
to go. This list will likely expand over time:

* Run `etc/scripts/release.hs check` on Linux (32-bit and 64-bit), Windows (`--arch=i386` and `--arch=x86_64`), and OS X. See its
[README](../etc/scripts/README.md#release.hs) for build and invocation instructions.
This performs the following checks automatically:
* `stack install && stack clean && stack install --pedantic && stack test --flag stack:integration-tests` on Linux, Windows, and OS X, which covers:
* Self-hosting
* Unit tests
* Integration tests
* stack can install GHC
* Working tree is clean.
* Ensure that `stack --version` gives the correct version number and Git hash, and does not have a dirty tree
to go:

* Integration tests pass on a representative sample of platforms: `stack test
--flag stack:integration-tests`. The actual release script will perform a more
thorough test for every platform/variant prior to uploading, so this is just a
pre-check
* stack can build the wai repo
* Running `stack build` a second time on either stack or wai is a no-op
* Build something that depends on `happy` (suggestion: `hlint`), since `happy` has special logic for moving around the `dist` directory
* Make sure to bump the version number in the .cabal file and the ChangeLog appropriately
* Review man page and other documentation for any changes that need to be made.
* Build something that depends on `happy` (suggestion: `hlint`), since `happy`
has special logic for moving around the `dist` directory
* Make sure to bump the version number in the .cabal file and the ChangeLog
appropriately (check for any entries that snuck into the previous version's
changes)
* In release candidate, remove the Changelog's "unreleased changes" section
* Review documentation for any changes that need to be made
* Search for old Stack version and replace with new version
* Ensure all `doc/*.md` files are listed in `stack.cabal`'s 'extra-source-files`
* Check that any new Linux distribution versions added to
`etc/scripts/release.hs` and `etc/scripts/vagrant-releases.sh`
* Check that no new entries need to be added to
[releases.yaml](https://github.com/fpco/stackage-content/blob/master/stack/releases.yaml),
[install_and_upgrade.md](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md),
and
[README.md](https://github.com/commercialhaskell/stack/blob/master/README.md)

## Release process

See
[stack-release-script's README](https://github.com/commercialhaskell/stack/blob/master/etc/scripts/README.md#prerequisites)
for requirements to perform the release, and more details about the tool.

* Create a draft Github release with tag `vX.Y.Z` (where X.Y.Z is the stack
package's version)

* On each machine you'll be releasing from, set environment variables:
`GITHUB_AUTHORIZATION_TOKEN`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`

* On a machine with Vagrant installed:
* Run `etc/scripts/vagrant-releases.sh`

* On Mac OS X:
* Run `etc/scripts/osx-release.sh`

* On Windows:
* Ensure your working tree is in `C:\stack` (or a similarly short path)
* Run `etc\scripts\windows-releases.bat`

* Push signed Git tag, matching Github release tag name, e.g.: `git tag -u
9BEFB442 vX.Y.Z && git push origin vX.Y.Z`

* Reset the `release` branch to the released commit, e.g.: `git merge --ff-only
vX.Y.Z && git push origin release`

* Publish Github release

* Edit
[stack-setup-2.yaml](https://github.com/fpco/stackage-content/blob/master/stack/stack-setup-2.yaml),
and add the new linux64 stack bindist

* Upload package to Hackage: `stack upload . --pvp-bounds=both`

* On a machine with Vagrant installed:
* Run `etc/scripts/vagrant-distros.sh`

* Update in Arch Linux's
[haskell-stack.git](ssh+git://[email protected]/haskell-stack.git):
`PKGBUILD` and `.SRCINFO`
* Be sure to reset `pkgrel` in both files, and update the SHA1 sum

* Submit a PR for the
[haskell-stack Homebrew formula](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/haskell-stack.rb).
The commit message should just be `haskell-stack <VERSION>`
* Note: for v0.1.8.0, check if `pcre` should still be a dependency
* Also, update the homepage

* Build Windows installers. See https://github.com/borsboom/stack-installer#readme

* [Build new MinGHC distribution](#build_minghc)

* [Upload haddocks to Hackage](#upload_haddocks), if hackage couldn't build on its own

* Announce to haskell-cafe, commercialhaskell, and haskell-stack mailing lists

# Extra steps

## Upload haddocks to Hackage <a name="upload_haddocks"></a>

* Set `STACKVER` environment variable to the Stack version (e.g. `0.1.6.0`)
* Run:

```
STACKDOCDIR=stack-$STACKVER-docs
rm -rf _release/$STACKDOCDIR
mkdir -p _release
cp -r $(stack path --local-doc-root)/stack-$STACKVER _release/$STACKDOCDIR
sed -i '' 's/href="\.\.\/\([^/]*\)\//href="..\/..\/\1\/docs\//g' _release/$STACKDOCDIR/*.html
(cd _release && tar cvz --format=ustar -f $STACKDOCDIR.tar.gz $STACKDOCDIR)
curl -X PUT \
-H 'Content-Type: application/x-tar' \
-H 'Content-Encoding: gzip' \
-u borsboom \
--data-binary "@_release/$STACKDOCDIR.tar.gz" \
"https://hackage.haskell.org/package/stack-$STACKVER/docs"
```

Release checklist after testing:
## Update MinGHC <a name="build_minghc"></a>

* Create a draft Github release with tag `vX.Y.Z` (where X.Y.Z is the stack package's version).
* Run `etc/scripts/release.hs release` on Linux (Debian 7 32-bit [Vagrantfile](https://github.com/commercialhaskell/stack/tree/master/etc/vagrant/debian-7-i386)/64-bit [Vagrantfile](https://github.com/commercialhaskell/stack/tree/master/etc/vagrant/debian-7-amd64)), Windows (`--arch=i386` and `--arch=x86_64`), and OS X. This performs the following tasks automatically:
* Binaries for Linux, Windows, and OS X uploaded to draft Github release.
* Run `etc/scripts/release.hs --binary-variant=gmp4 release` on CentOS 6 32-bit [Vagrantfile](https://github.com/commercialhaskell/stack/tree/master/etc/vagrant/centos-6-i386)/64-bit [Vagrantfile](centos-6-x86_64)).
* Run `etc/scripts/release.hs ubuntu-upload debian-upload` in Linux (Ubuntu or Debian - [Vagrantfile](https://github.com/commercialhaskell/stack/tree/master/etc/vagrant/debian-7-amd64))
* Run `etc/scripts/release.hs centos-upload fedora-upload` on Linux (CentOS or Fedora - [Vagrantfile](https://github.com/commercialhaskell/stack/tree/master/etc/vagrant/centos-7-x86_64))
* Upload Arch Linux packages (manual process)
* Build new MinGHC distribution (See https://github.com/fpco/minghc/commit/51490f398e6722672364548a3855a0bfcba48ffe)
Full details of prerequisites and steps for building MinGHC are in its
[README](https://github.com/fpco/minghc#building-installers). What follows is an
abbreviated set specifically for including the latest stack version.

After binaries uploaded:
* Ensure `makensis.exe` and `signtool.exe` are on your PATH.
* If you edit build-post-install.hs, run `stack exec -- cmd /c build-post-install.bat`
* Set `STACKVER` environment variable to latest Stack verion (e.g. `0.1.6.0`)
* Adjust commands below for new GHC versions
* Run:

* Push signed Git tag (matching Github release tag name).
* Publish Github release.
* Upload package to Hackage.
* Announce to haskell-cafe, commercialhaskell, and haskell-stack mailing lists.
```
stack build
stack exec -- minghc-generate 7.10.2 --stack=%STACKVER%
signtool sign /v /n "FP Complete, Corporation" /t "http://timestamp.verisign.com/scripts/timestamp.dll" .build\minghc-7.10.2-i386.exe
stack exec -- minghc-generate 7.10.2 --arch64 --stack=%STACKVER%
signtool sign /v /n "FP Complete, Corporation" /t "http://timestamp.verisign.com/scripts/timestamp.dll" .build\minghc-7.10.2-x86_64.exe
stack exec -- minghc-generate 7.8.4 --stack=%STACKVER%
signtool sign /v /n "FP Complete, Corporation" /t "http://timestamp.verisign.com/scripts/timestamp.dll" .build\minghc-7.8.4-i386.exe
stack exec -- minghc-generate 7.8.4 --arch64 --stack=%STACKVER%
signtool sign /v /n "FP Complete, Corporation" /t "http://timestamp.verisign.com/scripts/timestamp.dll" .build\minghc-7.8.4-x86_64.exe
```

For more information, see: https://github.com/commercialhaskell/stack/issues/324
* Upload the built binaries to a new Github release
* Edit [README.md](https://github.com/fpco/minghc/blob/master/README.md#using-the-installer) and update download links
Loading

0 comments on commit 57d787e

Please sign in to comment.