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

replace system-fileio with directory #18

Merged
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
19 changes: 9 additions & 10 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/andreasabel/haskell-ci
#
# version: 0.17.20231012
# version: 0.17.20240110
#
# REGENDATA ("0.17.20231012",["github","http-io-streams.cabal"])
# REGENDATA ("0.17.20240110",["github","http-io-streams.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -37,14 +37,14 @@ jobs:
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.6.4
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.6.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.7
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
Expand Down Expand Up @@ -94,11 +94,10 @@ jobs:
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y libbrotli-dev
env:
Expand All @@ -118,7 +117,7 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
See also http://pvp.haskell.org/faq

#### 0.1.6.4

* Depend on `directory` rather than `system-fileio` ([PR #18](https://github.com/haskell-hvr/http-io-streams/pull/18)).

Tested with GHC 8.0 - 9.8.

#### 0.1.6.3

* Test-suite: add dependency `attoparsec-aeson` for `aeson-2.2`.
Expand Down
8 changes: 4 additions & 4 deletions http-io-streams.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: http-io-streams
version: 0.1.6.3
version: 0.1.6.4

synopsis: HTTP and WebSocket client based on io-streams
description:
Expand Down Expand Up @@ -32,8 +32,8 @@ extra-source-files:

tested-with:
GHC == 9.8.1
GHC == 9.6.3
GHC == 9.4.7
GHC == 9.6.4
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
GHC == 8.10.7
Expand Down Expand Up @@ -168,5 +168,5 @@ test-suite test
, snap-core
, snap-server
, system-filepath
, system-fileio
, directory
, unordered-containers
5 changes: 2 additions & 3 deletions tests/MockServer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as S
import qualified Data.ByteString.Lazy.Char8 as L
import Data.Maybe (fromMaybe)
import Filesystem (getSize)
import Filesystem.Path.CurrentOS (decodeString)
import System.Directory (getFileSize)
import Snap.Core
import Snap.Http.Server
import Snap.Util.FileServe
Expand Down Expand Up @@ -112,7 +111,7 @@ serveStatic = do
let f' = S.concat ["tests/", i']
let f = S.unpack f'

l <- liftIO $ getSize $ decodeString f
l <- liftIO $ getFileSize f

let t = fileType defaultMimeTypes f
modifyResponse $ setContentType t
Expand Down