diff --git a/.cirrus.yml b/.cirrus.yml index 40b99e55d2..8790f21485 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -16,8 +16,8 @@ task: # What to build # ------------------------------------------------------------------------ # DISABLE_TEST: "y" - # DISABLE_BENCH: "y" - # DISABLE_DOCS: "y" + DISABLE_BENCH: "y" + DISABLE_DOCS: "y" DISABLE_SDIST_BUILD: "y" # DISABLE_SDIST_GIT_CHECK: "y" DISABLE_DIST_CHECKS: "y" @@ -56,7 +56,7 @@ task: # If you have not committed packcheck.sh in your repo at PACKCHECK # then it is automatically pulled from this URL. PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "6ee4502650b49cbbdb583fc7a55731738c9303df" + PACKCHECK_GITHUB_COMMIT: "b3743510c7c26f83254ffd9ef91bcd71560cff05" cabal_cache: folder: ~/.cabal diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 90cf6f3fce..73fa43208a 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -93,6 +93,9 @@ jobs: BUILD_PREFETCH=y GHCUP_VERSION=latest GHCVER=${{ matrix.ghc_version }} + DISABLE_SDIST_BUILD="y" + DISABLE_BENCH="y" + DISABLE_DOCS="y" # WARNING! you cannot use comments in this CABAL_OPTIONS: >- @@ -109,7 +112,7 @@ jobs: # If you have not committed packcheck.sh in your repo at PACKCHECK # then it is automatically pulled from this URL. PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "669c3b553add086bb8a667049ac21cf83499cf13" + PACKCHECK_GITHUB_COMMIT: "b3743510c7c26f83254ffd9ef91bcd71560cff05" # Pull token from "secrets" setting of the github repo #COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} @@ -169,7 +172,8 @@ jobs: # DISABLE_SDIST_BUILD="y" # ignore_error: true - - name: fusion + # Disable sdist build so that we can test all packages. + - name: fusion-bench-doc runner: ubuntu-latest command: cabal ghc_version: 9.14.1 @@ -177,9 +181,8 @@ jobs: pack_options: >- CABAL_PROJECT=cabal.project CABAL_BUILD_OPTIONS="--flag limit-build-mem --flag fusion-plugin" - DISABLE_SDIST_BUILD="y" - DISABLE_DOCS="y" - DISABLE_BENCH="y" + DISABLE_DOCS="n" + DISABLE_BENCH="n" ignore_error: false - name: streamly-core-sdist @@ -189,7 +192,7 @@ jobs: subdir: core ignore_error: false - - name: debug-unoptimized + - name: debug-no-opt runner: macos-latest command: cabal ghc_version: 9.14.1 @@ -197,13 +200,10 @@ jobs: pack_options: >- CABAL_PROJECT=cabal.project CABAL_BUILD_OPTIONS="--flag debug --flag -opt" - DISABLE_SDIST_BUILD="y" - DISABLE_DOCS="y" - DISABLE_BENCH="y" ignore_error: false # Takes too long, so bench is disabled - - name: ghc-9.12.4 + - name: nightly-2026-03-10 runner: macos-latest command: stack # WARNING! cannot use # comments inside pack_options. @@ -212,11 +212,8 @@ jobs: STACK_UPGRADE="y" RESOLVER=nightly-2026-03-10 STACK_YAML=stack.yaml - DISABLE_SDIST_BUILD="y" SDIST_OPTIONS="--ignore-check" DISABLE_DIST_CHECKS="y" - DISABLE_DOCS="y" - DISABLE_BENCH="y" ignore_error: false # Note: use linux for warning build for convenient dev testing @@ -240,8 +237,6 @@ jobs: pack_options: >- CABAL_PROJECT=cabal.project CABAL_BUILD_OPTIONS="--flag fusion-plugin --flag inspection" - DISABLE_SDIST_BUILD="y" - DISABLE_DOCS="y" ignore_error: false - name: ci @@ -251,9 +246,6 @@ jobs: # WARNING! cannot use # comments inside pack_options. pack_options: >- CABAL_PROJECT=cabal.project - DISABLE_SDIST_BUILD="y" - DISABLE_DOCS="y" - DISABLE_BENCH="y" ignore_error: false - name: streamly-sdist @@ -263,6 +255,7 @@ jobs: # WARNING! cannot use # comments inside pack_options. pack_options: >- CABAL_PROJECT=cabal.project.streamly + DISABLE_SDIST_BUILD="n" ignore_error: true - name: lstat-readdir @@ -273,12 +266,9 @@ jobs: pack_options: >- CABAL_PROJECT=cabal.project CABAL_BUILD_OPTIONS="--flag force-lstat-readdir" - DISABLE_SDIST_BUILD="y" - DISABLE_DOCS="y" - DISABLE_BENCH="y" ignore_error: false - - name: ci + - name: custom-ghc runner: ubuntu-latest command: cabal ghc_version: 9.2.8 @@ -288,9 +278,6 @@ jobs: pack_options: >- GHCUP_GHC_OPTIONS="-u https://github.com/composewell/ghc/releases/download/ghc-9.2.8-perf-counters-1-rc1/ghc-9.2.8.20231130-x86_64-unknown-linux.tar.xz" CABAL_PROJECT=cabal.project - DISABLE_SDIST_BUILD="y" - DISABLE_DOCS="y" - DISABLE_BENCH="y" ignore_error: false - name: unoptimized @@ -300,10 +287,6 @@ jobs: # WARNING! cannot use # comments inside pack_options. pack_options: >- CABAL_PROJECT=cabal.project - DISABLE_SDIST_BUILD="y" - DISABLE_DOCS="y" - DISABLE_BENCH="y" - DISABLE_DIST_CHECKS="y" CABAL_BUILD_OPTIONS="--flags \"-opt\"" ignore_error: false @@ -314,8 +297,6 @@ jobs: # WARNING! cannot use # comments inside pack_options. pack_options: >- CABAL_PROJECT=cabal.project - CABAL_BUILD_OPTIONS="--flag limit-build-mem" - DISABLE_SDIST_BUILD="y" ignore_error: false #- name: ci diff --git a/appveyor.yml b/appveyor.yml index faf7793438..081e5552d9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ # You can use any of the options supported by packcheck as environment # variables here. See https://github.com/composewell/packcheck for all # options and their explanation. -# + branches: only: - master @@ -23,7 +23,7 @@ environment: # ------------------------------------------------------------------------ # GHCUP_VERSION: "0.1.50.2" - GHCVER: "9.14.1" + GHCVER: "9.12.4" #CABALVER: "3.10.3.0" # ------------------------------------------------------------------------ @@ -33,10 +33,13 @@ environment: DISABLE_BENCH: "y" DISABLE_DOCS: "y" DISABLE_DIST_CHECKS: "y" + # On Windows, DISABLE_SDIST_BUILD is useful for (1) avoiding + # path length restriction, (2) avoid installing autoreconf + # for configure builds. DISABLE_SDIST_BUILD: "y" # Note: these require the "diff" utility. # DISABLE_SDIST_GIT_CHECK: "y" - # DISABLE_SDIST_PROJECT_CHECK: "y" + DISABLE_SDIST_PROJECT_CHECK: "y" # ------------------------------------------------------------------------ # cabal options @@ -55,12 +58,16 @@ environment: # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH # then it is automatically pulled from this URL. PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "dd6862df527f317fd4987afa523fba3f4fde7e19" + PACKCHECK_GITHUB_COMMIT: "b3743510c7c26f83254ffd9ef91bcd71560cff05" # Override the temp directory to avoid sed escaping issues # See https://github.com/haskell/cabal/issues/5386 TMP: "c:\\tmp" +# ------------------------------------------------------------------------ +# Usually you do not need to change anything below this line +# ------------------------------------------------------------------------ + # Bump the -> version to clear the cache # packcheck uses "%APPDATA%\\local" to install tools like hlint etc. # cabal may use "%APPDATA%\\cabal" or "c:\\cabal" @@ -72,7 +79,8 @@ cache: - "C:\\ghcup" - "C:\\cabal" -# Folder where the repository is cloned. +# Folder where the repository is cloned. Kept as short as possible to avoid +# long path issues on Windows. clone_folder: "c:\\pkg" build: off diff --git a/cabal.project b/cabal.project index 7babce2fc6..c702bc9041 100644 --- a/cabal.project +++ b/cabal.project @@ -5,7 +5,7 @@ packages: streamly.cabal , bench-test-lib/bench-test-lib.cabal -- For debugging heap overflow -jobs: 1 +-- jobs: 1 source-repository-package type: git diff --git a/cabal.project.Werror b/cabal.project.Werror index d01b665f45..f29e65f70b 100644 --- a/cabal.project.Werror +++ b/cabal.project.Werror @@ -6,7 +6,7 @@ packages: bench-test-lib -- For debugging heap overflow -jobs: 1 +-- jobs: 1 package streamly ghc-options: -Werror diff --git a/flake.lock b/flake.lock index e07465c269..114d59a6ed 100644 --- a/flake.lock +++ b/flake.lock @@ -7,65 +7,65 @@ "nixpkgs-darwin": "nixpkgs-darwin" }, "locked": { - "lastModified": 1764227617, - "narHash": "sha256-6ufcKQRBK41hzBQPQKHTUqdB5TXYyx4QD3TwaXymHwg=", + "lastModified": 1776414440, + "narHash": "sha256-Be67u+Qea2sEuI+3BVjkc+o4fYgRT/fOANGNAp2OuFk=", "ref": "refs/heads/master", - "rev": "5c3c31fa35f9f75a52e2fd68f7d1d47f7622ce33", - "revCount": 108, + "rev": "69728978adc44f53b3dd907acb2eb5bd2415fd60", + "revCount": 125, "type": "git", "url": "ssh://git@github.com/composewell/streamly-packages" }, "original": { - "rev": "5c3c31fa35f9f75a52e2fd68f7d1d47f7622ce33", + "rev": "69728978adc44f53b3dd907acb2eb5bd2415fd60", "type": "git", "url": "ssh://git@github.com/composewell/streamly-packages" } }, "basepkgs_2": { "locked": { - "lastModified": 1764227406, - "narHash": "sha256-aLI1AFkYWoJAWftnnQwLRiUaZnVIzNY3kkjW5ITigew=", + "lastModified": 1776376172, + "narHash": "sha256-tVn1PuKG+kJGH2PUnV3weRHDnbtgUDlwwSC0K3A45aM=", "owner": "composewell", "repo": "nixpack", - "rev": "b00feebadac4b09a4670c7d68a567dc957f6cb82", + "rev": "f50a0b2aaaab434f46847bc171240957b508b901", "type": "github" }, "original": { "owner": "composewell", "repo": "nixpack", - "rev": "b00feebadac4b09a4670c7d68a567dc957f6cb82", + "rev": "f50a0b2aaaab434f46847bc171240957b508b901", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1761440988, - "narHash": "sha256-2qsow3cQIgZB2g8Cy8cW+L9eXDHP6a1PsvOschk5y+E=", + "lastModified": 1774106199, + "narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "de69d2ba6c70e747320df9c096523b623d3a4c35", + "rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "de69d2ba6c70e747320df9c096523b623d3a4c35", + "rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655", "type": "github" } }, "nixpkgs-darwin": { "locked": { - "lastModified": 1761430225, - "narHash": "sha256-rwI/YwAAByROAXkGbQNsxgUl/UM5eG5N6XIUzBKOIOw=", + "lastModified": 1774106199, + "narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "08478b816182dc3cc208210b996294411690111d", + "rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "08478b816182dc3cc208210b996294411690111d", + "rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655", "type": "github" } }, diff --git a/flake.nix b/flake.nix index c3e6a53c0a..6e32c34eef 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Streamly"; inputs = { - basepkgs.url = "git+ssh://git@github.com/composewell/streamly-packages?rev=5c3c31fa35f9f75a52e2fd68f7d1d47f7622ce33"; + basepkgs.url = "git+ssh://git@github.com/composewell/streamly-packages?rev=69728978adc44f53b3dd907acb2eb5bd2415fd60"; nixpkgs.follows = "basepkgs/nixpkgs"; nixpkgs-darwin.follows = "basepkgs/nixpkgs-darwin"; }; diff --git a/sources.nix b/sources.nix index e5451776d6..fca82e8133 100644 --- a/sources.nix +++ b/sources.nix @@ -5,13 +5,17 @@ layers = [ { streamly = local ./.; streamly-core = local ./core; - streamly-benchmarks = localOpts ./benchmark - ["--benchmark --flag fusion-plugin --flag inspection"] - ["--flags fusion-plugin"]; - streamly-tests = localOpts ./test - ["--flag fusion-plugin"] - ["--flags fusion-plugin"]; + streamly-benchmarks = local ./benchmark + // { c2nix = ["--flag fusion-plugin --flag inspection"]; + flags = ["--flags fusion-plugin"]; + }; + streamly-tests = local ./test + // { c2nix = ["--flag fusion-plugin"]; + flags = ["--flags fusion-plugin"]; + }; bench-test-lib = local ./bench-test-lib; + + network = hackage "3.2.7.0" "08frm9gm422b9aqlmmzflj0yr80ic0ip8s4gsmr0izhizzab5420"; } ]; } diff --git a/streamly.cabal b/streamly.cabal index 5904b4e052..4ee4cf4b8d 100644 --- a/streamly.cabal +++ b/streamly.cabal @@ -45,16 +45,15 @@ homepage: https://streamly.composewell.com bug-reports: https://github.com/composewell/streamly/issues license: BSD-3-Clause license-file: LICENSE -tested-with: GHC==8.6.5 - , GHC==8.8.4 - , GHC==8.10.7 - , GHC==9.0.2 - , GHC==9.2.8 - , GHC==9.4.7 - , GHC==9.6.3 - , GHC==9.8.1 - , GHC==9.10.1 - , GHC==9.12.1 +tested-with: + GHC==8.10.7 + , GHC==9.2.8 + , GHC==9.4.7 + , GHC==9.6.3 + , GHC==9.8.4 + , GHC==9.10.3 + , GHC==9.12.4 + , GHC==9.14.1 author: Composewell Technologies maintainer: streamly@composewell.com copyright: 2017 Composewell Technologies diff --git a/test/Streamly/Test/FileSystem/DirIO.hs b/test/Streamly/Test/FileSystem/DirIO.hs index f4296e7cff..ce660f672e 100644 --- a/test/Streamly/Test/FileSystem/DirIO.hs +++ b/test/Streamly/Test/FileSystem/DirIO.hs @@ -23,6 +23,8 @@ import GHC.IO.Encoding (setLocaleEncoding, utf8) import Streamly.Data.Array (Array) #endif import System.Directory (createDirectoryLink) +import System.FilePath (()) +import System.IO.Temp (withSystemTempDirectory) import qualified Streamly.Unicode.Stream as Unicode import qualified Streamly.Internal.Unicode.Stream as Unicode (lines) @@ -69,9 +71,9 @@ testCorrectnessByteChunked expectation lister = do reality `shouldBe` expectation #endif -testSymLinkFollow :: Spec -testSymLinkFollow = do - let fp = "benchmark-tmp/dir-structure-small-sym" +testSymLinkFollow :: FilePath -> Spec +testSymLinkFollow tmpDir = do + let fp = tmpDir "dir-structure-small-sym" -- We create and use a different directory tree here for these tests because -- of convinence. pathsUnsorted <- runIO $ createDirStucture fp 2 3 @@ -130,12 +132,11 @@ testSymLinkFollow = do fp) -- | List the current directory recursively -main :: IO () -main = do - setLocaleEncoding utf8 +runTests :: FilePath -> IO () +runTests tmpDir = do - let smallTree = "benchmark-tmp/dir-structure-small" - bigTree = "benchmark-tmp/dir-structure-big" + let smallTree = tmpDir "dir-structure-small" + bigTree = tmpDir "dir-structure-big" pathsSmallUnsorted <- createDirStucture smallTree 2 3 pathsBigUnsorted <- createDirStucture bigTree 5 5 @@ -199,4 +200,10 @@ main = do testCorrectness pathsBig (listDirChunkParInterleaved id bigTree) it "listDirChunkParOrdered" $ testCorrectness pathsBig (listDirChunkParOrdered id bigTree) - testSymLinkFollow + testSymLinkFollow tmpDir + +-- | List the current directory recursively +main :: IO () +main = do + setLocaleEncoding utf8 + withSystemTempDirectory "hspec-test" runTests