Skip to content

Commit

Permalink
WIP: Re-enable -Werror=deprecations for latest deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Rufflewind committed Apr 13, 2024
1 parent 06dd500 commit 0545564
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ jobs:
matrix:
include:
- { os: macos-latest, stack: lts-12.26, stack-extra-deps: "bytestring-0.11.3.0, filepath-1.4.100.0, unix-2.8.0.0" }
- { os: macos-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, filepath-1.5.2.0, os-string-2.0.2, unix-2.8.5.1", stack-package-flags: "{directory: {os-string: true}, unix: {os-string: true}}" }
- { os: macos-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, filepath-1.5.2.0, os-string-2.0.2, unix-2.8.5.1", stack-package-flags: "{directory: {os-string: true}, unix: {os-string: true}}", ghc-flags: -Werror=deprecations }
- { os: ubuntu-latest, ghc: 8.4.4, cabal: 3.0.0.0, overrides: "before_prepare() { sed -i.bak /utimensat/d configure.ac; }" }
- { os: ubuntu-latest, ghc: 8.6.5, cabal: 3.0.0.0, overrides: "before_prepare() { sed -i.bak /utimensat/d configure.ac; }" }
- { os: ubuntu-latest, ghc: 8.10.7, cabal: 3.8.1.0 }
- { os: ubuntu-latest, ghc: 9.0.2, cabal: 3.8.1.0 }
- { os: ubuntu-latest, ghc: 9.2.4, cabal: 3.8.1.0 }
- { os: ubuntu-latest, ghc: 9.4.3, cabal: 3.8.1.0 }
- { os: ubuntu-latest, ghc: latest, cabal: latest }
- { os: ubuntu-latest, ghc: latest, cabal: latest, cabal-package-flags: +os-string, ghc-flags: -Werror=deprecations }
- { os: windows-latest, stack: lts-12.26, stack-extra-deps: "bytestring-0.11.3.0, filepath-1.4.100.0, time-1.8.0.2, Win32-2.13.3.0", overrides: "before_prepare() { sed -i.bak -e /CreateSymbolicLinkW/d -e /GetFinalPathNameByHandleW/d configure.ac; }" }
- { os: windows-latest, stack: lts-17.5, stack-extra-deps: "bytestring-0.11.3.0, filepath-1.4.100.0, time-1.9.3, Win32-2.13.3.0" }
- { os: windows-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, filepath-1.5.2.0, os-string-2.0.2, time-1.14, Win32-2.14.0.0", stack-package-flags: "{directory: {os-string: true}, Win32: {os-string: true}}" }
- { os: windows-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, filepath-1.5.2.0, os-string-2.0.2, time-1.14, Win32-2.14.0.0", stack-package-flags: "{directory: {os-string: true}, Win32: {os-string: true}}", ghc-flags: -Werror=deprecations }
runs-on: ${{ matrix.os }}
env:
CABAL_PACKAGE_FLAGS: ${{ matrix.cabal-package-flags }}
GHC_FLAGS: ${{ matrix.ghc-flags }}
TESTSCRIPT_OVERRIDES: ${{ matrix.overrides }}
STACK_EXTRA_DEPS: ${{ matrix.stack-extra-deps }}
STACK_PACKAGE_FLAGS: ${{ matrix.stack-package-flags }}
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Changelog for the [`directory`][1] package
([#171](https://github.com/haskell/directory/issues/171))
* Relax `base` version bounds to support 4.20.
([#173](https://github.com/haskell/directory/issues/173))
* Relax `filepath` version bounds to support 1.4.300 when `os-string` is
unavailable.
([#175](https://github.com/haskell/directory/issues/175))

## 1.3.8.3 (Jan 2024)

Expand Down
2 changes: 1 addition & 1 deletion directory.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Library
if flag(os-string)
build-depends: filepath >= 1.5.0.0, os-string >= 2.0.0
else
build-depends: filepath >= 1.4.100.0 && < 1.5
build-depends: filepath >= 1.4.100.0 && < 1.5.0.0

ghc-options: -Wall

Expand Down
7 changes: 2 additions & 5 deletions tools/testscript
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#!/bin/sh
set -eux

# directory-1.3.8.3 supports both filepath 1.4 and 1.5
# However, filepath 1.4.300.1 added a deprecation warning
# for some imports that were removed in filepath 1.5
# We disable -Werror for deprecations for this reason
ghcflags="-rtsopts -threaded -Werror -Wwarn=deprecations"
ghcflags="-rtsopts -threaded -Werror -Wwarn=deprecations ${GHC_FLAGS-}"
testflags="CreateDirectoryIfMissing001.num-repeats=100000 +RTS -N2"
stack="stack --no-terminal ${STACK_FLAGS-}"

Expand Down Expand Up @@ -37,6 +33,7 @@ EOF
packages: *.cabal
package directory
ghc-options: $ghcflags
flags: ${CABAL_PACKAGE_FLAGS-}
EOF
ghc --version
cabal --version
Expand Down

0 comments on commit 0545564

Please sign in to comment.