Skip to content

Commit

Permalink
Fix #5885 Move Stack to Cabal-3.8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Dec 27, 2022
1 parent 257f09c commit 8fd3ced
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 7 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,21 @@ jobs:
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.cache-bust }}
- name: Update PATH on Windows
if: startsWith(runner.os, 'Windows')
run: |
# On Windows, `stack upgrade` fails to overwrite the Stack executable at
# C:\hostedtoolcache\windows\stack\2.9.1\x64\, so add location of
# upgraded Stack executable to the PATH for subsequent steps:
Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\AppData\Roaming\local\bin"
- name: Install deps and run checks
shell: bash
run: |
set -ex
# Stack 2.9.3 is required to build Stack
stack upgrade
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
then
# Retry installing nix due to nondeterministic error
Expand Down Expand Up @@ -94,7 +104,8 @@ jobs:
- name: Build bindist
shell: bash
run: stack etc/scripts/release.hs build ${{ matrix.release-args }}
run: |
stack etc/scripts/release.hs build ${{ matrix.release-args }}
- name: Upload bindist
uses: actions/upload-artifact@v3
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ jobs:
restore-keys: |
${{ runner.os }}-
- name: Pedantic build
run: stack --system-ghc build --pedantic
run: |
# Stack 2.9.3 is required to build Stack
stack upgrade
stack build --pedantic
unit-tests:
name: Unit tests
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -65,11 +68,21 @@ jobs:
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.extra-suffix }}
- name: Update PATH on Windows
if: startsWith(runner.os, 'Windows')
run: |
# On Windows, `stack upgrade` fails to overwrite the stack executable at
# C:\hostedtoolcache\windows\stack\2.9.1\x64\, so add location of
# upgraded Stack executable to the PATH for subsequent steps:
Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\AppData\Roaming\local\bin"
- name: Run tests
shell: bash
run: |
set -ex
# Stack 2.9.3 is required to build Stack
stack upgrade
if [[ "${{ matrix.extra-suffix }}" == "alpine" ]]
then
mkdir -p ~/.stack
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ghc-options:
- -optP-Wno-nonportable-include-path # workaround [Filename case on macOS · Issue #4739 · haskell/cabal](https://github.com/haskell/cabal/issues/4739)
dependencies:
- base >= 4.14.3.0 && < 5
- Cabal >= 3.6.3.0
- Cabal >= 3.8.1.0
- aeson >= 2.0.3.0
- annotated-wl-pprint
- ansi-terminal
Expand Down
8 changes: 4 additions & 4 deletions stack.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ library
src/
ghc-options: -fwrite-ide-info -hiedir=.hie -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path -fwarn-identities
build-depends:
Cabal >=3.6.3.0
Cabal >=3.8.1.0
, aeson >=2.0.3.0
, annotated-wl-pprint
, ansi-terminal
Expand Down Expand Up @@ -389,7 +389,7 @@ executable stack
src/main
ghc-options: -fwrite-ide-info -hiedir=.hie -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path -threaded -rtsopts
build-depends:
Cabal >=3.6.3.0
Cabal >=3.8.1.0
, aeson >=2.0.3.0
, annotated-wl-pprint
, ansi-terminal
Expand Down Expand Up @@ -512,7 +512,7 @@ executable stack-integration-test
test/integration/lib
ghc-options: -fwrite-ide-info -hiedir=.hie -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path -threaded -rtsopts -with-rtsopts=-N
build-depends:
Cabal >=3.6.3.0
Cabal >=3.8.1.0
, aeson >=2.0.3.0
, annotated-wl-pprint
, ansi-terminal
Expand Down Expand Up @@ -642,7 +642,7 @@ test-suite stack-test
src/test
ghc-options: -fwrite-ide-info -hiedir=.hie -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path -threaded
build-depends:
Cabal >=3.6.3.0
Cabal >=3.8.1.0
, QuickCheck
, aeson >=2.0.3.0
, annotated-wl-pprint
Expand Down
8 changes: 8 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ extra-deps:
- pantry-0.8.1@sha256:196111414d2489499fda6213deebcb865bc12285023d5af9bd273bf27cdb185d,4099
- persistent-2.14.4.3@sha256:22237669897fed2b71de521bfeba7f8e0677e54992920288ae1fa8206a4711fc,7199
- rio-prettyprint-0.1.4.0@sha256:1f8eb3ead0ef33d3736d53e1de5e9b2c91a0c207cdca23321bd74c401e85f23a,1301
# lts-20.0 specifies Cabal-3.6.3.0
- Cabal-3.8.1.0@sha256:155d64beeecbae2b19e5d67844532494af88bc8795d4db4146a0c29296f59967,12220
# lts-20.0 specifies Cabal-syntax-3.6.0.0
- Cabal-syntax-3.8.1.0@sha256:4936765e9a7a8ecbf8fdbe9067f6d972bc0299220063abb2632a9950af64b966,7619

drop-packages:
# See https://github.com/commercialhaskell/stack/pull/4712
Expand All @@ -28,6 +32,10 @@ nix:
flags:
stack:
developer-mode: true
hackage-security:
Cabal-syntax: true
mintty:
win32-2-13-1: false

ghc-options:
"$locals": -fhide-source-paths
14 changes: 14 additions & 0 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ packages:
size: 628
original:
hackage: rio-prettyprint-0.1.4.0@sha256:1f8eb3ead0ef33d3736d53e1de5e9b2c91a0c207cdca23321bd74c401e85f23a,1301
- completed:
hackage: Cabal-3.8.1.0@sha256:155d64beeecbae2b19e5d67844532494af88bc8795d4db4146a0c29296f59967,12220
pantry-tree:
sha256: 0df207f33a2167f23ab8192b3c1e5722b60836bcdde18a0b5b24fb85b41c05ef
size: 8955
original:
hackage: Cabal-3.8.1.0@sha256:155d64beeecbae2b19e5d67844532494af88bc8795d4db4146a0c29296f59967,12220
- completed:
hackage: Cabal-syntax-3.8.1.0@sha256:4936765e9a7a8ecbf8fdbe9067f6d972bc0299220063abb2632a9950af64b966,7619
pantry-tree:
sha256: 0471cade235bb93e1fd32630f6d5fa69735a879d2712f47067c51bed0c46d536
size: 11052
original:
hackage: Cabal-syntax-3.8.1.0@sha256:4936765e9a7a8ecbf8fdbe9067f6d972bc0299220063abb2632a9950af64b966,7619
snapshots:
- completed:
sha256: a2cbcd2f37010a64c4ef74c21fd7e55982a07b49840d2bed306f9bac9981a9c3
Expand Down

0 comments on commit 8fd3ced

Please sign in to comment.