Skip to content

Commit 803411c

Browse files
committed
Remove Cabal flag os-string in favor of impl(ghc >= 9.2)
Fixes #176.
1 parent ca651e7 commit 803411c

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
include:
20-
- { os: macOS-14, stack: lts-20.26, stack-extra-deps: "bytestring-0.11.3.0, file-io-0.1.4, filepath-1.4.100.0, unix-2.8.0.0" }
21-
- { os: macos-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, file-io-0.1.4, filepath-1.5.2.0, os-string-2.0.2, unix-2.8.5.1", stack-package-flags: "{directory: {os-string: true}, file-io: {os-string: true}, unix: {os-string: true}}", ghc-flags: -Werror=deprecations }
20+
- { os: macOS-14, stack: lts-20.26, stack-extra-deps: "bytestring-0.11.3.0, file-io-0.1.4, filepath-1.5.2.0, os-string-2.0.2, unix-2.8.5.1", stack-package-flags: "{file-io: {os-string: true}, unix: {os-string: true}}" }
21+
- { os: macos-latest, stack: lts-24.29, ghc-flags: -Werror=deprecations }
2222
- { os: ubuntu-latest, ghc: 8.10.7, cabal: 3.8.1.0 }
2323
- { os: ubuntu-latest, ghc: 9.0.2, cabal: 3.8.1.0 }
2424
- { os: ubuntu-latest, ghc: 9.2.4, cabal: 3.8.1.0 }
@@ -27,7 +27,7 @@ jobs:
2727
- { os: ubuntu-latest, ghc: latest, cabal: 3.12.1.0, cabal-package-flags: +os-string, ghc-flags: -Werror=deprecations }
2828
- { os: windows-latest, stack: lts-15.3, stack-extra-deps: "bytestring-0.11.3.0, file-io-0.1.4, filepath-1.4.100.0, time-1.9.3, Win32-2.14.1.0", overrides: "before_prepare() { sed -i.bak -e /CreateSymbolicLinkW/d -e /GetFinalPathNameByHandleW/d configure.ac; }" }
2929
- { os: windows-latest, stack: lts-17.5, stack-extra-deps: "bytestring-0.11.3.0, file-io-0.1.4, filepath-1.4.100.0, time-1.9.3, Win32-2.14.1.0" }
30-
- { os: windows-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, file-io-0.1.4, filepath-1.5.2.0, os-string-2.0.2, time-1.14, Win32-2.14.1.0", stack-package-flags: "{directory: {os-string: true}, file-io: {os-string: true}, Win32: {os-string: true}}", ghc-flags: -Werror=deprecations }
30+
- { os: windows-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, file-io-0.1.4, filepath-1.5.2.0, os-string-2.0.2, time-1.14, Win32-2.14.1.0", stack-package-flags: "{file-io: {os-string: true}, Win32: {os-string: true}}", ghc-flags: -Werror=deprecations }
3131
runs-on: ${{ matrix.os }}
3232
env:
3333
CABAL_PACKAGE_FLAGS: ${{ matrix.cabal-package-flags }}

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog for the [`directory`][1] package
22
==========================================
33

4+
## 1.3.11.0 (HEAD)
5+
6+
* Cabal flag `os-string` was removed in favor of `impl(ghc >= 9.2)`.
7+
([#176](https://github.com/haskell/directory/issues/176))
8+
49
## 1.3.10.1 (Jan 2026)
510

611
* Make `findExecutable` return `Nothing` on absolute paths that aren't

directory.cabal

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ source-repository head
3434
type: git
3535
location: https://github.com/haskell/directory
3636

37-
flag os-string
38-
description: Use the new os-string package
39-
default: False
40-
manual: False
41-
4237
Library
4338
default-language: Haskell2010
4439
other-extensions: CApiFFI, CPP
@@ -66,10 +61,11 @@ Library
6661
else
6762
build-depends: unix >= 2.8.0 && < 2.9
6863

69-
if flag(os-string)
70-
build-depends: filepath >= 1.5.0.0, os-string >= 2.0.0
64+
if impl(ghc >= 9.2)
65+
build-depends: filepath >= 1.5.0 && < 1.6,
66+
os-string >= 2.0.0 && < 2.1,
7167
else
72-
build-depends: filepath >= 1.4.100.0 && < 1.5.0.0
68+
build-depends: filepath >= 1.4.100 && < 1.5.0
7369

7470
ghc-options: -Wall
7571

0 commit comments

Comments
 (0)