From e72ecb2f16ae0284db809792345bda6f2b8b8353 Mon Sep 17 00:00:00 2001 From: Phil Ruffwind Date: Fri, 12 Apr 2024 22:12:14 -0700 Subject: [PATCH] WIP: Re-enable -Werror=deprecations for latest deps --- .github/workflows/build.yml | 9 +++++---- changelog.md | 3 +++ directory.cabal | 2 +- tools/testscript | 6 +----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd467d7e..fcfb1edf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,23 +15,24 @@ 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.0.2, cabal: 3.8.1.0, ghc_flags: -Werror=deprecations } - { 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, 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: TESTSCRIPT_OVERRIDES: ${{ matrix.overrides }} STACK_EXTRA_DEPS: ${{ matrix.stack-extra-deps }} STACK_PACKAGE_FLAGS: ${{ matrix.stack-package-flags }} STACK_RESOLVER: ${{ matrix.stack }} + GHC_FLAGS: ${{ matrix.ghc_flags }} steps: - if: startsWith(matrix.os, 'macos-') run: brew install automake diff --git a/changelog.md b/changelog.md index b74ec0f0..eaf1aa4e 100644 --- a/changelog.md +++ b/changelog.md @@ -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) diff --git a/directory.cabal b/directory.cabal index c990422e..bece80e7 100644 --- a/directory.cabal +++ b/directory.cabal @@ -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 diff --git a/tools/testscript b/tools/testscript index 1a689a25..24862283 100755 --- a/tools/testscript +++ b/tools/testscript @@ -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-}"