Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumps for GHC 9.8, fix building with unix-2.8, update CI #420

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
run: |
choco install -y haskell-stack
choco install -y r --version 4.0.0
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Get Stack snapshot install directory
id: stack-snapshot
run: |
stack path --snapshot-install-root
echo "::set-output name=dir::$(stack path --snapshot-install-root)"
- uses: actions/cache@v1
dir="$(stack path --snapshot-install-root)"
echo "${dir}"
echo "dir=${dir}" > "${GITHUB_OUTPUT}"
- uses: actions/cache@v3
with:
path: ${{ steps.stack-snapshot.outputs.dir }}
key: ${{ steps.stack-snapshot.outputs.dir }}-${{ hashFiles('**/*.cabal') }}
restore-keys: |
${{ runner.os }}-stack-
key: ${{ runner.os }}-stack--${{ hashFiles('**/*.cabal') }}
restore-keys: ${{ runner.os }}-stack-
- name: Build
run: |
stack build inline-r H `
Expand All @@ -34,10 +34,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
stack_yaml: [stack.yaml, stack-lts-18.yaml, stack-lts-19.yaml]
stack_yaml: [stack.yaml, stack-lts-18.yaml, stack-lts-19.yaml, stack-lts-20.yaml, stack-lts-21.yaml]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=./nixpkgs.nix
Expand All @@ -49,15 +49,15 @@ jobs:
run: |
# XXX Workaround
# https://github.com/commercialhaskell/stack/issues/5028.
[ ${{ matrix.stack_yaml }} = stack.yaml ] || mv ${{ matrix.stack_yaml }} stack.yaml
stack --nix path --snapshot-install-root
echo "::set-output name=dir::$(stack --nix path --snapshot-install-root)"
- uses: actions/cache@v2
[ "${{ matrix.stack_yaml }}" == "stack.yaml" ] || mv "${{ matrix.stack_yaml }}" stack.yaml
dir="$(stack --nix path --snapshot-install-root)"
echo "${dir}"
echo "dir=${dir}" > "${GITHUB_OUTPUT}"
- uses: actions/cache@v3
with:
path: ${{ steps.stack-snapshot.outputs.dir }}
key: ${{ steps.stack-snapshot.outputs.dir }}-${{ hashFiles('**/*.cabal') }}
restore-keys: |
${{ steps.stack-snapshot.outputs.dir }}
key: ${{ runner.os }}-stack--${{ hashFiles('**/*.cabal') }}
restore-keys: ${{ runner.os }}-stack-
- name: Build
run: |
stack --nix build
Expand Down
79 changes: 43 additions & 36 deletions inline-r/inline-r.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,23 @@ library
Internal.Error
build-depends:
base >=4.7 && <5,
aeson >=0.6 && <2.2,
bytestring >=0.10 && <0.12,
containers >=0.5 && <0.7,
aeson >=0.6 && <2.3,
bytestring >=0.10 && <0.13,
containers >=0.5 && <0.8,
data-default-class >=0.1.2.0 && <0.2,
deepseq >=1.3 && <1.5,
deepseq >=1.3 && <1.6,
exceptions >=0.6 && <1.1,
heredoc >=0.2 && <0.3,
inline-c >=0.6 && <0.10,
mtl >=2.1 && <2.4,
pretty >=1.1 && <1.2,
primitive >=0.5 && <0.9,
primitive >=0.5 && <0.10,
process >=1.2 && <1.7,
reflection >=2 && <2.2,
setenv >=0.1.1 && <0.2,
template-haskell >=2.8 && <2.21,
template-haskell >=2.8 && <2.22,
temporary >=1.2 && <1.4,
text >=0.11 && <2.1,
text >=0.11 && <2.2,
th-lift >=0.6 && <0.9,
th-orphans >=0.8 && <0.14,
transformers >=0.3 && <0.7,
Expand All @@ -106,7 +106,7 @@ library
else
build-depends:
singletons >=3 && <3.1,
singletons-th >=3 && <3.3,
singletons-th >=3 && <3.4,
hs-source-dirs: src
includes: cbits/missing_r.h
c-sources: cbits/missing_r.c
Expand All @@ -132,27 +132,30 @@ test-suite tests
type: exitcode-stdio-1.0
build-depends:
inline-r,
base >=4.6 && <5,
bytestring >=0.10 && <0.12,
-- bounds inherited from library
base,
bytestring,
heredoc,
mtl,
process,
temporary,
text,
-- additional packages
directory >=1.2 && <1.4,
filepath >=1.3 && <1.5,
heredoc >=0.2 && <0.3,
ieee754 >=0.7 && <0.9,
mtl >=2.0 && <2.4,
process >=1.2 && <1.7,
quickcheck-assertions >=0.1.1 && <0.4,
singletons >=0.10 && <3.1,
strict >=0.3.2 && <0.6,
tasty >=0.11 && <1.5,
tasty >=0.11 && <1.6,
tasty-expected-failure >=0.11 && <0.13,
tasty-golden >=2.3 && <2.4,
tasty-hunit >=0.4.1 && <0.11,
tasty-quickcheck >=0.4.1 && <0.11,
temporary >=1.2 && <1.4,
text >=0.11 && <2.1,
-- different bounds than library
vector >=0.12.3.1 && <0.14,
if !os(windows)
build-depends: unix >=2.5 && <2.9,
build-depends: unix
other-modules:
Test.GC
Test.FunPtr
Expand All @@ -170,12 +173,14 @@ test-suite test-qq
type: exitcode-stdio-1.0
build-depends:
inline-r,
base >=4.6 && <5,
mtl >=2.0 && <2.4,
process >=1.2 && <1.7,
tasty-hunit >=0.4.1 && <0.11,
-- bounds inherited from library
base,
mtl,
process,
text,
-- additional packages
singletons >=0.9 && <3.1,
text >=0.11 && <2.1,
tasty-hunit >=0.4.1 && <0.11,
ghc-options: -Wall -threaded
hs-source-dirs: tests
default-language: Haskell2010
Expand All @@ -186,13 +191,15 @@ test-suite test-shootout
other-modules: Test.Scripts
build-depends:
inline-r,
base >=4.6 && <5,
-- bounds inherited from library
base,
process,
template-haskell,
-- additional packages
filepath >=1.3 && <1.5,
process >=1.2 && <1.7,
silently >=1.2 && <1.3,
tasty >=0.3 && <1.5,
tasty >=0.3 && <1.6,
tasty-hunit >=0.4.1 && <0.11,
template-haskell >=2.8 && <2.21,
ghc-options: -Wall -threaded
hs-source-dirs: tests
default-language: Haskell2010
Expand All @@ -204,8 +211,8 @@ test-suite test-env1
type: exitcode-stdio-1.0
build-depends:
inline-r,
base >=4.6 && <5,
tasty >=0.3 && <1.5,
base,
tasty >=0.3 && <1.6,
tasty-hunit >=0.4.1 && <0.11,
ghc-options: -Wall -threaded
hs-source-dirs: tests
Expand All @@ -216,8 +223,8 @@ test-suite test-env2
type: exitcode-stdio-1.0
build-depends:
inline-r,
base >=4.6 && <5,
tasty >=0.3 && <1.5,
base,
tasty >=0.3 && <1.6,
tasty-hunit >=0.4.1 && <0.11,
ghc-options: -Wall -threaded
hs-source-dirs: tests
Expand All @@ -228,11 +235,11 @@ benchmark bench-qq
type: exitcode-stdio-1.0
build-depends:
inline-r,
base >=4.6 && <5,
base,
criterion >=0.8 && <1.7,
filepath >=1.3 && <1.5,
process >=1.2 && <1.7,
template-haskell >=2.8 && <2.21,
process,
template-haskell,
ghc-options: -Wall -threaded
hs-source-dirs: tests
default-language: Haskell2010
Expand All @@ -242,10 +249,10 @@ benchmark bench-hexp
type: exitcode-stdio-1.0
build-depends:
inline-r,
base >=4.6 && <5,
base,
criterion >=0.8 && <1.7,
primitive >=0.5 && <0.9,
vector >=0.10 && <0.14,
primitive,
vector,
singletons >=2.7 && <3.1,
ghc-options: -Wall -threaded
hs-source-dirs: tests
Expand Down
4 changes: 4 additions & 0 deletions inline-r/tests/Test/Event.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ tests = testGroup "events"
withSystemTempFile "inline-r-" $ \path h -> do
hPutStrLn h "hello"
hClose h
#if MIN_VERSION_unix(2,8,0)
fd <- openFd path ReadOnly defaultFileFlags{ nonBlock = True }
#else
fd <- openFd path ReadOnly Nothing defaultFileFlags{ nonBlock = True }
#endif
action fd
closeFd fd
#endif
14 changes: 14 additions & 0 deletions stack-lts-20.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resolver: lts-20.26

packages:
- examples
- H
- IHaskell
- inline-r

extra-deps:
- ihaskell-blaze-0.3.0.1

nix:
shell-file: ./shell.nix
path: ["nixpkgs=./nixpkgs.nix"]
19 changes: 19 additions & 0 deletions stack-lts-20.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: ihaskell-blaze-0.3.0.1@sha256:57f0e79758d084da3a662d0909ba2b01e469200029fed495fc208ba5f59024fd,2161
pantry-tree:
sha256: 69fee7554a6410e45011c89d9e9547d18e2798e4f01ebd0426573b05e0e21696
size: 223
original:
hackage: ihaskell-blaze-0.3.0.1
snapshots:
- completed:
sha256: 5a59b2a405b3aba3c00188453be172b85893cab8ebc352b1ef58b0eae5d248a2
size: 650475
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/26.yaml
original: lts-20.26
17 changes: 17 additions & 0 deletions stack-lts-21.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resolver: lts-21.19

packages:
- examples
- H
- IHaskell
- inline-r

extra-deps:
- ghc-parser-0.2.6.0
- ihaskell-0.11.0.0
- ihaskell-blaze-0.3.0.1
- ipython-kernel-0.11.0.0

nix:
shell-file: ./shell.nix
path: ["nixpkgs=./nixpkgs.nix"]
40 changes: 40 additions & 0 deletions stack-lts-21.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: ghc-parser-0.2.6.0@sha256:0b0cbceb3bd2762cef201dc54ae302d7918bed23b2f85ffd99c1c8b6a9df32b6,1579
pantry-tree:
sha256: 02bb412e738063631d10750648b5c432d5df99599eaeff5050d92df6416df102
size: 903
original:
hackage: ghc-parser-0.2.6.0
- completed:
hackage: ihaskell-0.11.0.0@sha256:beff2321a5d753d8d74509b6b1f4aebc9b466e32bb91d028dc60e08658184625,6729
pantry-tree:
sha256: 40e8d35f3a061ee0f22825f72c42edfd2352a9a05a4ac85190b6e13a00c23aff
size: 2939
original:
hackage: ihaskell-0.11.0.0
- completed:
hackage: ihaskell-blaze-0.3.0.1@sha256:57f0e79758d084da3a662d0909ba2b01e469200029fed495fc208ba5f59024fd,2161
pantry-tree:
sha256: 69fee7554a6410e45011c89d9e9547d18e2798e4f01ebd0426573b05e0e21696
size: 223
original:
hackage: ihaskell-blaze-0.3.0.1
- completed:
hackage: ipython-kernel-0.11.0.0@sha256:4e1c174037c4088b0113663d17c443fb6612e0f7639d28152c1e237816972550,2676
pantry-tree:
sha256: 56fb92a6761881b39a0a2e2835e9d6fecd0ad15310c2a5c854ea2abcc9e78ecd
size: 792
original:
hackage: ipython-kernel-0.11.0.0
snapshots:
- completed:
sha256: fb482b8e2d5d061cdda4ba1da2957c012740c893a5ee1c1b99001adae7b1fbe7
size: 640046
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/19.yaml
original: lts-21.19
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-20.11
resolver: nightly-2023-11-10

packages:
- examples
Expand Down
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ packages:
hackage: ihaskell-blaze-0.3.0.1
snapshots:
- completed:
sha256: adbc602422dde10cc330175da7de8609e70afc41449a7e2d6e8b1827aa0e5008
size: 649342
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/11.yaml
original: lts-20.11
sha256: 0580a03f247573451c0a676673e0c2b474e0d42f78d4a93c4cd10eb32f2cb911
size: 698107
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2023/11/10.yaml
original: nightly-2023-11-10
Loading