Skip to content

Commit c4a5498

Browse files
committed
Re-enable -Werror=deprecations for latest deps
1 parent 06dd500 commit c4a5498

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.github/workflows/build.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ jobs:
1515
matrix:
1616
include:
1717
- { 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" }
18-
- { 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}}" }
18+
- { 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 }
1919
- { os: ubuntu-latest, ghc: 8.4.4, cabal: 3.0.0.0, overrides: "before_prepare() { sed -i.bak /utimensat/d configure.ac; }" }
2020
- { os: ubuntu-latest, ghc: 8.6.5, cabal: 3.0.0.0, overrides: "before_prepare() { sed -i.bak /utimensat/d configure.ac; }" }
2121
- { os: ubuntu-latest, ghc: 8.10.7, cabal: 3.8.1.0 }
2222
- { os: ubuntu-latest, ghc: 9.0.2, cabal: 3.8.1.0 }
2323
- { os: ubuntu-latest, ghc: 9.2.4, cabal: 3.8.1.0 }
2424
- { os: ubuntu-latest, ghc: 9.4.3, cabal: 3.8.1.0 }
25-
- { os: ubuntu-latest, ghc: latest, cabal: latest }
25+
- { os: ubuntu-latest, ghc: latest, cabal: latest, cabal-package-flags: +os-string, ghc-flags: -Werror=deprecations }
2626
- { 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; }" }
2727
- { 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" }
28-
- { 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}}" }
28+
- { 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 }
2929
runs-on: ${{ matrix.os }}
3030
env:
31+
CABAL_PACKAGE_FLAGS: ${{ matrix.cabal-package-flags }}
32+
GHC_FLAGS: ${{ matrix.ghc-flags }}
3133
TESTSCRIPT_OVERRIDES: ${{ matrix.overrides }}
3234
STACK_EXTRA_DEPS: ${{ matrix.stack-extra-deps }}
3335
STACK_PACKAGE_FLAGS: ${{ matrix.stack-package-flags }}

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Changelog for the [`directory`][1] package
77
([#171](https://github.com/haskell/directory/issues/171))
88
* Relax `base` version bounds to support 4.20.
99
([#173](https://github.com/haskell/directory/issues/173))
10+
* Relax `filepath` version bounds to support 1.4.300 when `os-string` is
11+
unavailable.
12+
([#175](https://github.com/haskell/directory/issues/175))
1013

1114
## 1.3.8.3 (Jan 2024)
1215

directory.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Library
7070
if flag(os-string)
7171
build-depends: filepath >= 1.5.0.0, os-string >= 2.0.0
7272
else
73-
build-depends: filepath >= 1.4.100.0 && < 1.5
73+
build-depends: filepath >= 1.4.100.0 && < 1.5.0.0
7474

7575
ghc-options: -Wall
7676

tools/testscript

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/bin/sh
22
set -eux
33

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

@@ -37,6 +33,7 @@ EOF
3733
packages: *.cabal
3834
package directory
3935
ghc-options: $ghcflags
36+
flags: ${CABAL_PACKAGE_FLAGS-}
4037
EOF
4138
ghc --version
4239
cabal --version

0 commit comments

Comments
 (0)