From e176d96ef374f8f69d330c035fae239f4d1b051e Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 3 May 2026 23:14:33 +0100 Subject: [PATCH 01/10] multi-test: Delete verbage --- .../tests/multi-test/files/LICENSE | 30 ------------------- .../tests/multi-test/files/Setup.hs | 2 -- .../tests/multi-test/files/cyclic/LICENSE | 30 ------------------- .../tests/multi-test/files/cyclic/Setup.hs | 2 -- .../multi-test/files/cyclic/cyclic.cabal | 16 ---------- .../multi-test/files/multi-test-suite.cabal | 14 --------- .../files/sub-package/sub-package.cabal | 10 ------- 7 files changed, 104 deletions(-) delete mode 100644 tests/integration/tests/multi-test/files/LICENSE delete mode 100644 tests/integration/tests/multi-test/files/Setup.hs delete mode 100644 tests/integration/tests/multi-test/files/cyclic/LICENSE delete mode 100644 tests/integration/tests/multi-test/files/cyclic/Setup.hs diff --git a/tests/integration/tests/multi-test/files/LICENSE b/tests/integration/tests/multi-test/files/LICENSE deleted file mode 100644 index d05408d876..0000000000 --- a/tests/integration/tests/multi-test/files/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (c) 2000 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Your name here nor the names of other - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/integration/tests/multi-test/files/Setup.hs b/tests/integration/tests/multi-test/files/Setup.hs deleted file mode 100644 index 9a994af677..0000000000 --- a/tests/integration/tests/multi-test/files/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/tests/integration/tests/multi-test/files/cyclic/LICENSE b/tests/integration/tests/multi-test/files/cyclic/LICENSE deleted file mode 100644 index d05408d876..0000000000 --- a/tests/integration/tests/multi-test/files/cyclic/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (c) 2000 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Your name here nor the names of other - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/integration/tests/multi-test/files/cyclic/Setup.hs b/tests/integration/tests/multi-test/files/cyclic/Setup.hs deleted file mode 100644 index 9a994af677..0000000000 --- a/tests/integration/tests/multi-test/files/cyclic/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal b/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal index 4faef11041..e404ec8d84 100644 --- a/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal +++ b/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal @@ -1,33 +1,17 @@ --- Initial cyclic.cabal generated by cabal init. For further --- documentation, see http://haskell.org/cabal/users-guide/ - name: cyclic version: 0.1.0.0 --- synopsis: --- description: --- license: -license-file: LICENSE -author: Michael Sloan -maintainer: mgsloan@gmail.com --- copyright: --- category: build-type: Simple --- extra-source-files: cabal-version: >=1.10 library exposed-modules: Cyclic - -- other-modules: - -- other-extensions: build-depends: base >=4.8 && <5.0 - -- hs-source-dirs: default-language: Haskell2010 test-suite cyclic-test-suite type: exitcode-stdio-1.0 main-is: Spec.hs build-depends: base - -- This is cyclic because multi-test-suite depends on this package. , multi-test-suite ghc-options: -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 diff --git a/tests/integration/tests/multi-test/files/multi-test-suite.cabal b/tests/integration/tests/multi-test/files/multi-test-suite.cabal index deb33d3572..64dc05d966 100644 --- a/tests/integration/tests/multi-test/files/multi-test-suite.cabal +++ b/tests/integration/tests/multi-test/files/multi-test-suite.cabal @@ -1,16 +1,6 @@ name: multi-test-suite version: 0.1.0.0 -synopsis: Initial project template from stack -description: Please see README.md -homepage: http://github.com/commercialhaskell/multi-test-suite#readme -license: BSD3 -license-file: LICENSE -author: Your name here -maintainer: your.address@example.com --- copyright: -category: Web build-type: Simple --- extra-source-files: cabal-version: >=1.10 library @@ -52,7 +42,3 @@ test-suite multi-test-suite-test-3 build-depends: base ghc-options: -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 - -source-repository head - type: git - location: https://github.com/commercialhaskell/multi-test-suite diff --git a/tests/integration/tests/multi-test/files/sub-package/sub-package.cabal b/tests/integration/tests/multi-test/files/sub-package/sub-package.cabal index 0e94272961..6c6ea63394 100644 --- a/tests/integration/tests/multi-test/files/sub-package/sub-package.cabal +++ b/tests/integration/tests/multi-test/files/sub-package/sub-package.cabal @@ -1,16 +1,6 @@ name: sub-package version: 0.1.0.0 -synopsis: Initial project template from stack -description: Please see README.md -homepage: http://github.com/commercialhaskell/multi-test-suite#readme -license: BSD3 -license-file: ../LICENSE -author: Your name here -maintainer: your.address@example.com --- copyright: -category: Web build-type: Simple --- extra-source-files: cabal-version: >=1.10 executable sub-package-exe From b7f01e36fd2deb904d8aefe599aaef66d114221b Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 3 May 2026 23:17:18 +0100 Subject: [PATCH 02/10] multi-test: Rename sub-package to myPackageC --- .../sub-package.cabal => myPackageC/myPackageC.cabal} | 2 +- .../multi-test/files/{sub-package => myPackageC}/src/Lib2.hs | 0 .../multi-test/files/{sub-package => myPackageC}/src/main.hs | 0 .../multi-test/files/{sub-package => myPackageC}/test/Spec.hs | 0 tests/integration/tests/multi-test/files/stack.yaml | 2 +- 5 files changed, 2 insertions(+), 2 deletions(-) rename tests/integration/tests/multi-test/files/{sub-package/sub-package.cabal => myPackageC/myPackageC.cabal} (94%) rename tests/integration/tests/multi-test/files/{sub-package => myPackageC}/src/Lib2.hs (100%) rename tests/integration/tests/multi-test/files/{sub-package => myPackageC}/src/main.hs (100%) rename tests/integration/tests/multi-test/files/{sub-package => myPackageC}/test/Spec.hs (100%) diff --git a/tests/integration/tests/multi-test/files/sub-package/sub-package.cabal b/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal similarity index 94% rename from tests/integration/tests/multi-test/files/sub-package/sub-package.cabal rename to tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal index 6c6ea63394..d25a6f797c 100644 --- a/tests/integration/tests/multi-test/files/sub-package/sub-package.cabal +++ b/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal @@ -1,4 +1,4 @@ -name: sub-package +name: myPackageC version: 0.1.0.0 build-type: Simple cabal-version: >=1.10 diff --git a/tests/integration/tests/multi-test/files/sub-package/src/Lib2.hs b/tests/integration/tests/multi-test/files/myPackageC/src/Lib2.hs similarity index 100% rename from tests/integration/tests/multi-test/files/sub-package/src/Lib2.hs rename to tests/integration/tests/multi-test/files/myPackageC/src/Lib2.hs diff --git a/tests/integration/tests/multi-test/files/sub-package/src/main.hs b/tests/integration/tests/multi-test/files/myPackageC/src/main.hs similarity index 100% rename from tests/integration/tests/multi-test/files/sub-package/src/main.hs rename to tests/integration/tests/multi-test/files/myPackageC/src/main.hs diff --git a/tests/integration/tests/multi-test/files/sub-package/test/Spec.hs b/tests/integration/tests/multi-test/files/myPackageC/test/Spec.hs similarity index 100% rename from tests/integration/tests/multi-test/files/sub-package/test/Spec.hs rename to tests/integration/tests/multi-test/files/myPackageC/test/Spec.hs diff --git a/tests/integration/tests/multi-test/files/stack.yaml b/tests/integration/tests/multi-test/files/stack.yaml index 002c22aefd..71edf0095b 100644 --- a/tests/integration/tests/multi-test/files/stack.yaml +++ b/tests/integration/tests/multi-test/files/stack.yaml @@ -1,5 +1,5 @@ snapshot: lts-24.37 packages: - . -- sub-package +- myPackageC - cyclic From 741e92a94db09f5fda6154408872395300624797 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 3 May 2026 23:29:39 +0100 Subject: [PATCH 03/10] multi-test: Rename multi-test-suite as myPackageA --- tests/integration/tests/multi-test/Main.hs | 2 +- .../tests/multi-test/files/cyclic/cyclic.cabal | 2 +- .../files/{multi-test-suite.cabal => myPackageA.cabal} | 8 ++++---- .../tests/multi-test/files/myPackageC/myPackageC.cabal | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename tests/integration/tests/multi-test/files/{multi-test-suite.cabal => myPackageA.cabal} (88%) diff --git a/tests/integration/tests/multi-test/Main.hs b/tests/integration/tests/multi-test/Main.hs index 56f21042ea..5b3efb59d5 100644 --- a/tests/integration/tests/multi-test/Main.hs +++ b/tests/integration/tests/multi-test/Main.hs @@ -7,7 +7,7 @@ main = do -- FIXME: Make 'clean' unnecessary (see #1411) stack ["clean"] stackCheckStderr ["test", "--coverage"] $ \out -> do - unless ("The coverage report for multi-test-suite's test-suite multi-test-suite-test is available at" `isInfixOf` out) $ + unless ("The coverage report for myPackageA's test-suite multi-test-suite-test is available at" `isInfixOf` out) $ fail "Didn't get expected report for multi-test-suite-test" unless ("[S-6829]" `isInfixOf` out) $ fail "Didn't get expected empty report for multi-test-suite-test-2" diff --git a/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal b/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal index e404ec8d84..fc8514bc4b 100644 --- a/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal +++ b/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal @@ -12,6 +12,6 @@ test-suite cyclic-test-suite type: exitcode-stdio-1.0 main-is: Spec.hs build-depends: base - , multi-test-suite + , myPackageA ghc-options: -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 diff --git a/tests/integration/tests/multi-test/files/multi-test-suite.cabal b/tests/integration/tests/multi-test/files/myPackageA.cabal similarity index 88% rename from tests/integration/tests/multi-test/files/multi-test-suite.cabal rename to tests/integration/tests/multi-test/files/myPackageA.cabal index 64dc05d966..6674aa8551 100644 --- a/tests/integration/tests/multi-test/files/multi-test-suite.cabal +++ b/tests/integration/tests/multi-test/files/myPackageA.cabal @@ -1,4 +1,4 @@ -name: multi-test-suite +name: myPackageA version: 0.1.0.0 build-type: Simple cabal-version: >=1.10 @@ -14,7 +14,7 @@ executable multi-test-suite-exe main-is: Main.hs ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: base - , multi-test-suite + , myPackageA default-language: Haskell2010 test-suite multi-test-suite-test @@ -22,7 +22,7 @@ test-suite multi-test-suite-test hs-source-dirs: test main-is: Spec.hs build-depends: base - , multi-test-suite + , myPackageA ghc-options: -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 @@ -31,7 +31,7 @@ test-suite multi-test-suite-test-2 hs-source-dirs: test-2 main-is: Spec.hs build-depends: base - , multi-test-suite + , myPackageA ghc-options: -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 diff --git a/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal b/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal index d25a6f797c..e939d179eb 100644 --- a/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal +++ b/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal @@ -17,5 +17,5 @@ test-suite sub-package-test other-modules: Lib2 ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: base - , multi-test-suite + , myPackageA default-language: Haskell2010 From d27779ed07db00116831432b130c59b33b8a9036 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 3 May 2026 23:40:57 +0100 Subject: [PATCH 04/10] multi-test: Use package.yaml for myPackageA --- .../tests/multi-test/files/.gitignore | 1 + .../tests/multi-test/files/myPackageA.cabal | 85 +++++++++++-------- .../tests/multi-test/files/package.yaml | 50 +++++++++++ 3 files changed, 102 insertions(+), 34 deletions(-) create mode 100644 tests/integration/tests/multi-test/files/.gitignore create mode 100644 tests/integration/tests/multi-test/files/package.yaml diff --git a/tests/integration/tests/multi-test/files/.gitignore b/tests/integration/tests/multi-test/files/.gitignore new file mode 100644 index 0000000000..6c121d3c41 --- /dev/null +++ b/tests/integration/tests/multi-test/files/.gitignore @@ -0,0 +1 @@ +myPackageA.cabal diff --git a/tests/integration/tests/multi-test/files/myPackageA.cabal b/tests/integration/tests/multi-test/files/myPackageA.cabal index 6674aa8551..b8b8ba3bae 100644 --- a/tests/integration/tests/multi-test/files/myPackageA.cabal +++ b/tests/integration/tests/multi-test/files/myPackageA.cabal @@ -1,44 +1,61 @@ -name: myPackageA -version: 0.1.0.0 -build-type: Simple -cabal-version: >=1.10 +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.39.1. +-- +-- see: https://github.com/sol/hpack + +name: myPackageA +version: 0.0.0 +build-type: Simple library - hs-source-dirs: src - exposed-modules: Lib - build-depends: base >= 4.7 && < 5, cyclic - default-language: Haskell2010 + exposed-modules: + Lib + hs-source-dirs: + src + build-depends: + base + , cyclic + default-language: Haskell2010 executable multi-test-suite-exe - hs-source-dirs: app - main-is: Main.hs - ghc-options: -threaded -rtsopts -with-rtsopts=-N - build-depends: base - , myPackageA - default-language: Haskell2010 + main-is: Main.hs + hs-source-dirs: + app + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base + , myPackageA + default-language: Haskell2010 test-suite multi-test-suite-test - type: exitcode-stdio-1.0 - hs-source-dirs: test - main-is: Spec.hs - build-depends: base - , myPackageA - ghc-options: -threaded -rtsopts -with-rtsopts=-N - default-language: Haskell2010 + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: + test + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base + , myPackageA + default-language: Haskell2010 test-suite multi-test-suite-test-2 - type: exitcode-stdio-1.0 - hs-source-dirs: test-2 - main-is: Spec.hs - build-depends: base - , myPackageA - ghc-options: -threaded -rtsopts -with-rtsopts=-N - default-language: Haskell2010 + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: + test-2 + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base + , myPackageA + default-language: Haskell2010 test-suite multi-test-suite-test-3 - type: exitcode-stdio-1.0 - hs-source-dirs: test-3 - main-is: Spec.hs - build-depends: base - ghc-options: -threaded -rtsopts -with-rtsopts=-N - default-language: Haskell2010 + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: + test-3 + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base + default-language: Haskell2010 diff --git a/tests/integration/tests/multi-test/files/package.yaml b/tests/integration/tests/multi-test/files/package.yaml new file mode 100644 index 0000000000..947bdf52f1 --- /dev/null +++ b/tests/integration/tests/multi-test/files/package.yaml @@ -0,0 +1,50 @@ +spec-version: 0.36.0 + +name: myPackageA + +dependencies: +- base + +library: + source-dirs: src + dependencies: + - cyclic + +executables: + multi-test-suite-exe: + source-dirs: app + main: Main.hs + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - myPackageA + +tests: + multi-test-suite-test: + source-dirs: test + main: Spec.hs + other-modules: [] + dependencies: + - myPackageA + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + multi-test-suite-test-2: + source-dirs: test-2 + main: Spec.hs + dependencies: + - myPackageA + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + multi-test-suite-test-3: + source-dirs: test-3 + main: Spec.hs + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N From fc6320735ac83304e3a77ff4d3df4e1be87d455e Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 3 May 2026 23:46:45 +0100 Subject: [PATCH 05/10] multi-test: Use package.yaml to describe myPackageC --- .../tests/multi-test/files/.gitignore | 1 + .../files/myPackageC/myPackageC.cabal | 21 ---------------- .../multi-test/files/myPackageC/package.yaml | 24 +++++++++++++++++++ 3 files changed, 25 insertions(+), 21 deletions(-) delete mode 100644 tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal create mode 100644 tests/integration/tests/multi-test/files/myPackageC/package.yaml diff --git a/tests/integration/tests/multi-test/files/.gitignore b/tests/integration/tests/multi-test/files/.gitignore index 6c121d3c41..8f20fe37c5 100644 --- a/tests/integration/tests/multi-test/files/.gitignore +++ b/tests/integration/tests/multi-test/files/.gitignore @@ -1 +1,2 @@ myPackageA.cabal +myPackageC.cabal diff --git a/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal b/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal deleted file mode 100644 index e939d179eb..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageC/myPackageC.cabal +++ /dev/null @@ -1,21 +0,0 @@ -name: myPackageC -version: 0.1.0.0 -build-type: Simple -cabal-version: >=1.10 - -executable sub-package-exe - hs-source-dirs: src - main-is: main.hs - other-modules: Lib2 - build-depends: base >= 4.7 && < 5 - default-language: Haskell2010 - -test-suite sub-package-test - type: exitcode-stdio-1.0 - hs-source-dirs: src, test - main-is: Spec.hs - other-modules: Lib2 - ghc-options: -threaded -rtsopts -with-rtsopts=-N - build-depends: base - , myPackageA - default-language: Haskell2010 diff --git a/tests/integration/tests/multi-test/files/myPackageC/package.yaml b/tests/integration/tests/multi-test/files/myPackageC/package.yaml new file mode 100644 index 0000000000..c86af8d87a --- /dev/null +++ b/tests/integration/tests/multi-test/files/myPackageC/package.yaml @@ -0,0 +1,24 @@ +spec-version: 0.36.0 + +name: myPackageC + +dependencies: +- base + +executables: + sub-package-exe: + source-dirs: src + main: main.hs + +tests: + sub-package-test: + source-dirs: + - src + - test + main: Spec.hs + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - myPackageA From 51c77b2174de9d4a2ca6db3b6887ef0c73ed9936 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 4 May 2026 00:06:05 +0100 Subject: [PATCH 06/10] multi-test: Rename cyclic directory myPackageB --- .../tests/multi-test/files/{cyclic => myPackageB}/Cyclic.hs | 0 .../tests/multi-test/files/{cyclic => myPackageB}/Spec.hs | 0 .../tests/multi-test/files/{cyclic => myPackageB}/cyclic.cabal | 0 tests/integration/tests/multi-test/files/stack.yaml | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename tests/integration/tests/multi-test/files/{cyclic => myPackageB}/Cyclic.hs (100%) rename tests/integration/tests/multi-test/files/{cyclic => myPackageB}/Spec.hs (100%) rename tests/integration/tests/multi-test/files/{cyclic => myPackageB}/cyclic.cabal (100%) diff --git a/tests/integration/tests/multi-test/files/cyclic/Cyclic.hs b/tests/integration/tests/multi-test/files/myPackageB/Cyclic.hs similarity index 100% rename from tests/integration/tests/multi-test/files/cyclic/Cyclic.hs rename to tests/integration/tests/multi-test/files/myPackageB/Cyclic.hs diff --git a/tests/integration/tests/multi-test/files/cyclic/Spec.hs b/tests/integration/tests/multi-test/files/myPackageB/Spec.hs similarity index 100% rename from tests/integration/tests/multi-test/files/cyclic/Spec.hs rename to tests/integration/tests/multi-test/files/myPackageB/Spec.hs diff --git a/tests/integration/tests/multi-test/files/cyclic/cyclic.cabal b/tests/integration/tests/multi-test/files/myPackageB/cyclic.cabal similarity index 100% rename from tests/integration/tests/multi-test/files/cyclic/cyclic.cabal rename to tests/integration/tests/multi-test/files/myPackageB/cyclic.cabal diff --git a/tests/integration/tests/multi-test/files/stack.yaml b/tests/integration/tests/multi-test/files/stack.yaml index 71edf0095b..5ce27196df 100644 --- a/tests/integration/tests/multi-test/files/stack.yaml +++ b/tests/integration/tests/multi-test/files/stack.yaml @@ -2,4 +2,4 @@ snapshot: lts-24.37 packages: - . - myPackageC -- cyclic +- myPackageB From 5c29d008cf221e86119253645b06663f341a97f3 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 4 May 2026 00:13:42 +0100 Subject: [PATCH 07/10] multi-test: Use package.yaml for cyclic --- .../tests/multi-test/files/.gitignore | 1 + .../multi-test/files/myPackageB/cyclic.cabal | 17 ---------------- .../multi-test/files/myPackageB/package.yaml | 20 +++++++++++++++++++ 3 files changed, 21 insertions(+), 17 deletions(-) delete mode 100644 tests/integration/tests/multi-test/files/myPackageB/cyclic.cabal create mode 100644 tests/integration/tests/multi-test/files/myPackageB/package.yaml diff --git a/tests/integration/tests/multi-test/files/.gitignore b/tests/integration/tests/multi-test/files/.gitignore index 8f20fe37c5..ea0553ea59 100644 --- a/tests/integration/tests/multi-test/files/.gitignore +++ b/tests/integration/tests/multi-test/files/.gitignore @@ -1,2 +1,3 @@ myPackageA.cabal myPackageC.cabal +cyclic.cabal diff --git a/tests/integration/tests/multi-test/files/myPackageB/cyclic.cabal b/tests/integration/tests/multi-test/files/myPackageB/cyclic.cabal deleted file mode 100644 index fc8514bc4b..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageB/cyclic.cabal +++ /dev/null @@ -1,17 +0,0 @@ -name: cyclic -version: 0.1.0.0 -build-type: Simple -cabal-version: >=1.10 - -library - exposed-modules: Cyclic - build-depends: base >=4.8 && <5.0 - default-language: Haskell2010 - -test-suite cyclic-test-suite - type: exitcode-stdio-1.0 - main-is: Spec.hs - build-depends: base - , myPackageA - ghc-options: -threaded -rtsopts -with-rtsopts=-N - default-language: Haskell2010 diff --git a/tests/integration/tests/multi-test/files/myPackageB/package.yaml b/tests/integration/tests/multi-test/files/myPackageB/package.yaml new file mode 100644 index 0000000000..0dd6c6ab85 --- /dev/null +++ b/tests/integration/tests/multi-test/files/myPackageB/package.yaml @@ -0,0 +1,20 @@ +spec-version: 0.36.0 + +name: cyclic + +dependencies: +- base + +library: + exposed-modules: + - Cyclic + +tests: + cyclic-test-suite: + main: Spec.hs + dependencies: + - myPackageA + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N From 781abe3012276ce8aee345498196664583d7174f Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 4 May 2026 00:34:13 +0100 Subject: [PATCH 08/10] multi-test: Rename cyclic 0myPackageB --- .../tests/multi-test/files/myPackageA.cabal | 61 ------------------- .../multi-test/files/myPackageB/package.yaml | 3 +- .../tests/multi-test/files/package.yaml | 3 +- 3 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 tests/integration/tests/multi-test/files/myPackageA.cabal diff --git a/tests/integration/tests/multi-test/files/myPackageA.cabal b/tests/integration/tests/multi-test/files/myPackageA.cabal deleted file mode 100644 index b8b8ba3bae..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageA.cabal +++ /dev/null @@ -1,61 +0,0 @@ -cabal-version: 1.12 - --- This file has been generated from package.yaml by hpack version 0.39.1. --- --- see: https://github.com/sol/hpack - -name: myPackageA -version: 0.0.0 -build-type: Simple - -library - exposed-modules: - Lib - hs-source-dirs: - src - build-depends: - base - , cyclic - default-language: Haskell2010 - -executable multi-test-suite-exe - main-is: Main.hs - hs-source-dirs: - app - ghc-options: -threaded -rtsopts -with-rtsopts=-N - build-depends: - base - , myPackageA - default-language: Haskell2010 - -test-suite multi-test-suite-test - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: - test - ghc-options: -threaded -rtsopts -with-rtsopts=-N - build-depends: - base - , myPackageA - default-language: Haskell2010 - -test-suite multi-test-suite-test-2 - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: - test-2 - ghc-options: -threaded -rtsopts -with-rtsopts=-N - build-depends: - base - , myPackageA - default-language: Haskell2010 - -test-suite multi-test-suite-test-3 - type: exitcode-stdio-1.0 - main-is: Spec.hs - hs-source-dirs: - test-3 - ghc-options: -threaded -rtsopts -with-rtsopts=-N - build-depends: - base - default-language: Haskell2010 diff --git a/tests/integration/tests/multi-test/files/myPackageB/package.yaml b/tests/integration/tests/multi-test/files/myPackageB/package.yaml index 0dd6c6ab85..0be458e3f4 100644 --- a/tests/integration/tests/multi-test/files/myPackageB/package.yaml +++ b/tests/integration/tests/multi-test/files/myPackageB/package.yaml @@ -1,6 +1,7 @@ spec-version: 0.36.0 -name: cyclic +# Only builds if this package name comes before myPackageA, alphabetically! +name: 0myPackageB dependencies: - base diff --git a/tests/integration/tests/multi-test/files/package.yaml b/tests/integration/tests/multi-test/files/package.yaml index 947bdf52f1..d217a67c9a 100644 --- a/tests/integration/tests/multi-test/files/package.yaml +++ b/tests/integration/tests/multi-test/files/package.yaml @@ -8,7 +8,8 @@ dependencies: library: source-dirs: src dependencies: - - cyclic + # Only builds if this package name comes before myPackageA, alphabetically! + - 0myPackageB executables: multi-test-suite-exe: From b4ef192115a7ffa6105a08b98ae2d0750aebbc00 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 4 May 2026 01:03:32 +0100 Subject: [PATCH 09/10] multi-test: Rename components --- tests/integration/tests/multi-test/Main.hs | 28 +++++++------- .../tests/multi-test/files/.gitignore | 2 +- .../tests/multi-test/files/app/Main.hs | 4 +- .../multi-test/files/myPackageB/Cyclic.hs | 4 -- .../tests/multi-test/files/myPackageB/Spec.hs | 4 -- .../multi-test/files/myPackageB/package.yaml | 12 ++---- .../multi-test/files/myPackageB/src/LibB.hs | 6 +++ .../multi-test/files/myPackageB/test/Main.hs | 4 ++ .../multi-test/files/myPackageC/app/Main.hs | 4 ++ .../multi-test/files/myPackageC/package.yaml | 16 ++++---- .../multi-test/files/myPackageC/src/Lib2.hs | 4 -- .../multi-test/files/myPackageC/src/LibC.hs | 6 +++ .../multi-test/files/myPackageC/src/main.hs | 3 -- .../multi-test/files/myPackageC/test/Main.hs | 7 ++++ .../multi-test/files/myPackageC/test/Spec.hs | 7 ---- .../tests/multi-test/files/package.yaml | 37 +++++-------------- .../tests/multi-test/files/src/Lib.hs | 16 -------- .../tests/multi-test/files/src/LibA.hs | 9 +++++ .../multi-test/files/test/OtherModule.hs | 0 .../tests/multi-test/files/test/Spec.hs | 4 -- .../tests/multi-test/files/test1/Main.hs | 4 ++ .../files/{test-2/Spec.hs => test2/Main.hs} | 2 +- .../files/{test-3/Spec.hs => test3/Main.hs} | 0 23 files changed, 79 insertions(+), 104 deletions(-) delete mode 100644 tests/integration/tests/multi-test/files/myPackageB/Cyclic.hs delete mode 100644 tests/integration/tests/multi-test/files/myPackageB/Spec.hs create mode 100644 tests/integration/tests/multi-test/files/myPackageB/src/LibB.hs create mode 100644 tests/integration/tests/multi-test/files/myPackageB/test/Main.hs create mode 100644 tests/integration/tests/multi-test/files/myPackageC/app/Main.hs delete mode 100644 tests/integration/tests/multi-test/files/myPackageC/src/Lib2.hs create mode 100644 tests/integration/tests/multi-test/files/myPackageC/src/LibC.hs delete mode 100644 tests/integration/tests/multi-test/files/myPackageC/src/main.hs create mode 100644 tests/integration/tests/multi-test/files/myPackageC/test/Main.hs delete mode 100644 tests/integration/tests/multi-test/files/myPackageC/test/Spec.hs delete mode 100644 tests/integration/tests/multi-test/files/src/Lib.hs create mode 100644 tests/integration/tests/multi-test/files/src/LibA.hs delete mode 100644 tests/integration/tests/multi-test/files/test/OtherModule.hs delete mode 100644 tests/integration/tests/multi-test/files/test/Spec.hs create mode 100644 tests/integration/tests/multi-test/files/test1/Main.hs rename tests/integration/tests/multi-test/files/{test-2/Spec.hs => test2/Main.hs} (71%) rename tests/integration/tests/multi-test/files/{test-3/Spec.hs => test3/Main.hs} (100%) diff --git a/tests/integration/tests/multi-test/Main.hs b/tests/integration/tests/multi-test/Main.hs index 5b3efb59d5..6a1afea640 100644 --- a/tests/integration/tests/multi-test/Main.hs +++ b/tests/integration/tests/multi-test/Main.hs @@ -1,17 +1,17 @@ -import Control.Monad (unless) -import Data.List (isInfixOf) -import StackTest +import Control.Monad ( unless ) +import Data.List ( isInfixOf ) +import StackTest main :: IO () main = do - -- FIXME: Make 'clean' unnecessary (see #1411) - stack ["clean"] - stackCheckStderr ["test", "--coverage"] $ \out -> do - unless ("The coverage report for myPackageA's test-suite multi-test-suite-test is available at" `isInfixOf` out) $ - fail "Didn't get expected report for multi-test-suite-test" - unless ("[S-6829]" `isInfixOf` out) $ - fail "Didn't get expected empty report for multi-test-suite-test-2" - -- Test then build works too. - stack ["clean"] - stack ["test"] - stack ["build"] + -- FIXME: Make 'clean' unnecessary (see #1411) + stack ["clean"] + stackCheckStderr ["test", "--coverage"] $ \out -> do + unless ("The coverage report for myPackageA's test-suite test1 is available at" `isInfixOf` out) $ + fail "Didn't get expected report for test1" + unless ("[S-6829]" `isInfixOf` out) $ + fail "Didn't get expected empty report for test2" + -- Test then build works too. + stack ["clean"] + stack ["test"] + stack ["build"] diff --git a/tests/integration/tests/multi-test/files/.gitignore b/tests/integration/tests/multi-test/files/.gitignore index ea0553ea59..0f3e4a815f 100644 --- a/tests/integration/tests/multi-test/files/.gitignore +++ b/tests/integration/tests/multi-test/files/.gitignore @@ -1,3 +1,3 @@ myPackageA.cabal myPackageC.cabal -cyclic.cabal +0myPackageB.cabal diff --git a/tests/integration/tests/multi-test/files/app/Main.hs b/tests/integration/tests/multi-test/files/app/Main.hs index de1c1ab35c..df716cf71e 100644 --- a/tests/integration/tests/multi-test/files/app/Main.hs +++ b/tests/integration/tests/multi-test/files/app/Main.hs @@ -1,6 +1,6 @@ module Main where -import Lib +import LibA ( funcA ) main :: IO () -main = someFunc +main = funcA diff --git a/tests/integration/tests/multi-test/files/myPackageB/Cyclic.hs b/tests/integration/tests/multi-test/files/myPackageB/Cyclic.hs deleted file mode 100644 index 57c0764899..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageB/Cyclic.hs +++ /dev/null @@ -1,4 +0,0 @@ -module Cyclic where - -cyclic :: String -cyclic = "Hello from cyclic" diff --git a/tests/integration/tests/multi-test/files/myPackageB/Spec.hs b/tests/integration/tests/multi-test/files/myPackageB/Spec.hs deleted file mode 100644 index 2a7e6b6085..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageB/Spec.hs +++ /dev/null @@ -1,4 +0,0 @@ -import Lib (cyclicOutput) - -main :: IO () -main = cyclicOutput diff --git a/tests/integration/tests/multi-test/files/myPackageB/package.yaml b/tests/integration/tests/multi-test/files/myPackageB/package.yaml index 0be458e3f4..202a258230 100644 --- a/tests/integration/tests/multi-test/files/myPackageB/package.yaml +++ b/tests/integration/tests/multi-test/files/myPackageB/package.yaml @@ -7,15 +7,11 @@ dependencies: - base library: - exposed-modules: - - Cyclic + source-dirs: src tests: - cyclic-test-suite: - main: Spec.hs + test: + source-dirs: test + main: Main.hs dependencies: - myPackageA - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N diff --git a/tests/integration/tests/multi-test/files/myPackageB/src/LibB.hs b/tests/integration/tests/multi-test/files/myPackageB/src/LibB.hs new file mode 100644 index 0000000000..e714f965fe --- /dev/null +++ b/tests/integration/tests/multi-test/files/myPackageB/src/LibB.hs @@ -0,0 +1,6 @@ +module LibB + ( funcB + ) where + +funcB :: IO () +funcB = pure () diff --git a/tests/integration/tests/multi-test/files/myPackageB/test/Main.hs b/tests/integration/tests/multi-test/files/myPackageB/test/Main.hs new file mode 100644 index 0000000000..e7c27dd1be --- /dev/null +++ b/tests/integration/tests/multi-test/files/myPackageB/test/Main.hs @@ -0,0 +1,4 @@ +import LibA ( funcB ) + +main :: IO () +main = funcB diff --git a/tests/integration/tests/multi-test/files/myPackageC/app/Main.hs b/tests/integration/tests/multi-test/files/myPackageC/app/Main.hs new file mode 100644 index 0000000000..ca55d965a4 --- /dev/null +++ b/tests/integration/tests/multi-test/files/myPackageC/app/Main.hs @@ -0,0 +1,4 @@ +import LibC ( funcC ) + +main :: IO () +main = funcC diff --git a/tests/integration/tests/multi-test/files/myPackageC/package.yaml b/tests/integration/tests/multi-test/files/myPackageC/package.yaml index c86af8d87a..629f8cba45 100644 --- a/tests/integration/tests/multi-test/files/myPackageC/package.yaml +++ b/tests/integration/tests/multi-test/files/myPackageC/package.yaml @@ -6,19 +6,17 @@ dependencies: - base executables: - sub-package-exe: - source-dirs: src - main: main.hs + myExeC: + source-dirs: + - app + - src + main: Main.hs tests: - sub-package-test: + test: source-dirs: - src - test - main: Spec.hs - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N + main: Main.hs dependencies: - myPackageA diff --git a/tests/integration/tests/multi-test/files/myPackageC/src/Lib2.hs b/tests/integration/tests/multi-test/files/myPackageC/src/Lib2.hs deleted file mode 100644 index 92ce236d56..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageC/src/Lib2.hs +++ /dev/null @@ -1,4 +0,0 @@ -module Lib2 where - -lib2 :: IO () -lib2 = putStrLn "lib2" diff --git a/tests/integration/tests/multi-test/files/myPackageC/src/LibC.hs b/tests/integration/tests/multi-test/files/myPackageC/src/LibC.hs new file mode 100644 index 0000000000..6289d8843d --- /dev/null +++ b/tests/integration/tests/multi-test/files/myPackageC/src/LibC.hs @@ -0,0 +1,6 @@ +module LibC + ( funcC + ) where + +funcC :: IO () +funcC = pure () diff --git a/tests/integration/tests/multi-test/files/myPackageC/src/main.hs b/tests/integration/tests/multi-test/files/myPackageC/src/main.hs deleted file mode 100644 index e84bf058a8..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageC/src/main.hs +++ /dev/null @@ -1,3 +0,0 @@ -import Lib2 - -main = lib2 diff --git a/tests/integration/tests/multi-test/files/myPackageC/test/Main.hs b/tests/integration/tests/multi-test/files/myPackageC/test/Main.hs new file mode 100644 index 0000000000..0535c37e44 --- /dev/null +++ b/tests/integration/tests/multi-test/files/myPackageC/test/Main.hs @@ -0,0 +1,7 @@ +import LibA ( funcA ) +import LibC ( funcC ) + +main :: IO () +main = do + funcA + funcC diff --git a/tests/integration/tests/multi-test/files/myPackageC/test/Spec.hs b/tests/integration/tests/multi-test/files/myPackageC/test/Spec.hs deleted file mode 100644 index 87852a7dec..0000000000 --- a/tests/integration/tests/multi-test/files/myPackageC/test/Spec.hs +++ /dev/null @@ -1,7 +0,0 @@ -import Lib -import Lib2 - -main :: IO () -main = do - someOtherFunc - lib2 diff --git a/tests/integration/tests/multi-test/files/package.yaml b/tests/integration/tests/multi-test/files/package.yaml index d217a67c9a..7811ddfd05 100644 --- a/tests/integration/tests/multi-test/files/package.yaml +++ b/tests/integration/tests/multi-test/files/package.yaml @@ -12,40 +12,23 @@ library: - 0myPackageB executables: - multi-test-suite-exe: + myExeA: source-dirs: app main: Main.hs - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N dependencies: - myPackageA tests: - multi-test-suite-test: - source-dirs: test - main: Spec.hs - other-modules: [] + test1: + source-dirs: test1 + main: Main.hs dependencies: - myPackageA - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N - multi-test-suite-test-2: - source-dirs: test-2 - main: Spec.hs + test2: + source-dirs: test2 + main: Main.hs dependencies: - myPackageA - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N - multi-test-suite-test-3: - source-dirs: test-3 - main: Spec.hs - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N + test3: + source-dirs: test3 + main: Main.hs diff --git a/tests/integration/tests/multi-test/files/src/Lib.hs b/tests/integration/tests/multi-test/files/src/Lib.hs deleted file mode 100644 index dc9643b828..0000000000 --- a/tests/integration/tests/multi-test/files/src/Lib.hs +++ /dev/null @@ -1,16 +0,0 @@ -module Lib - ( someFunc - , someOtherFunc - , cyclicOutput - ) where - -import Cyclic - -someFunc :: IO () -someFunc = putStrLn "someFunc" - -someOtherFunc :: IO () -someOtherFunc = putStrLn "someOtherFunc" - -cyclicOutput :: IO () -cyclicOutput = putStrLn cyclic diff --git a/tests/integration/tests/multi-test/files/src/LibA.hs b/tests/integration/tests/multi-test/files/src/LibA.hs new file mode 100644 index 0000000000..a7981b6f2c --- /dev/null +++ b/tests/integration/tests/multi-test/files/src/LibA.hs @@ -0,0 +1,9 @@ +module LibA + ( funcA + , funcB + ) where + +import LibB ( funcB ) + +funcA :: IO () +funcA = pure () diff --git a/tests/integration/tests/multi-test/files/test/OtherModule.hs b/tests/integration/tests/multi-test/files/test/OtherModule.hs deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/integration/tests/multi-test/files/test/Spec.hs b/tests/integration/tests/multi-test/files/test/Spec.hs deleted file mode 100644 index 7153edaf67..0000000000 --- a/tests/integration/tests/multi-test/files/test/Spec.hs +++ /dev/null @@ -1,4 +0,0 @@ -import Lib - -main :: IO () -main = someFunc diff --git a/tests/integration/tests/multi-test/files/test1/Main.hs b/tests/integration/tests/multi-test/files/test1/Main.hs new file mode 100644 index 0000000000..71c96e8fce --- /dev/null +++ b/tests/integration/tests/multi-test/files/test1/Main.hs @@ -0,0 +1,4 @@ +import LibA ( funcA ) + +main :: IO () +main = funcA diff --git a/tests/integration/tests/multi-test/files/test-2/Spec.hs b/tests/integration/tests/multi-test/files/test2/Main.hs similarity index 71% rename from tests/integration/tests/multi-test/files/test-2/Spec.hs rename to tests/integration/tests/multi-test/files/test2/Main.hs index c85feb952a..3ca9d54762 100644 --- a/tests/integration/tests/multi-test/files/test-2/Spec.hs +++ b/tests/integration/tests/multi-test/files/test2/Main.hs @@ -1,4 +1,4 @@ -import Lib +import LibA main :: IO () main = pure () diff --git a/tests/integration/tests/multi-test/files/test-3/Spec.hs b/tests/integration/tests/multi-test/files/test3/Main.hs similarity index 100% rename from tests/integration/tests/multi-test/files/test-3/Spec.hs rename to tests/integration/tests/multi-test/files/test3/Main.hs From 8ff654f819a9058aea0b0e3dfad77a39e9db157e Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Mon, 4 May 2026 10:36:38 +0100 Subject: [PATCH 10/10] multi-test: Move myPackageA into a package dir; add Haddock docs --- tests/integration/tests/multi-test/Main.hs | 17 +++++++++++++++++ .../files/{ => myPackageA}/app/Main.hs | 0 .../files/{ => myPackageA}/package.yaml | 0 .../files/{ => myPackageA}/src/LibA.hs | 0 .../files/{ => myPackageA}/test1/Main.hs | 0 .../files/{ => myPackageA}/test2/Main.hs | 0 .../files/{ => myPackageA}/test3/Main.hs | 0 .../tests/multi-test/files/stack.yaml | 7 ++++--- 8 files changed, 21 insertions(+), 3 deletions(-) rename tests/integration/tests/multi-test/files/{ => myPackageA}/app/Main.hs (100%) rename tests/integration/tests/multi-test/files/{ => myPackageA}/package.yaml (100%) rename tests/integration/tests/multi-test/files/{ => myPackageA}/src/LibA.hs (100%) rename tests/integration/tests/multi-test/files/{ => myPackageA}/test1/Main.hs (100%) rename tests/integration/tests/multi-test/files/{ => myPackageA}/test2/Main.hs (100%) rename tests/integration/tests/multi-test/files/{ => myPackageA}/test3/Main.hs (100%) diff --git a/tests/integration/tests/multi-test/Main.hs b/tests/integration/tests/multi-test/Main.hs index 6a1afea640..32853b1673 100644 --- a/tests/integration/tests/multi-test/Main.hs +++ b/tests/integration/tests/multi-test/Main.hs @@ -1,3 +1,20 @@ +-- | The test's project has project packages A, B and C (which has no library). +-- +-- In terms of main libraries, the dependencies are (->- is 'depends on'): +-- +-- A ->- B +-- +-- In terms of executables (including test suites): +-- +-- B ->- A and C ->- A +-- +-- As, overall, A ->- B and B ->- A, packages A and B cannot be built +-- 'all-in-one'. +-- +-- This integration test passes when A is named myPackageA and B is named +-- 0myPackageB, but it fails when B is renamed myPackageB. That must be a bug in +-- Stack. + import Control.Monad ( unless ) import Data.List ( isInfixOf ) import StackTest diff --git a/tests/integration/tests/multi-test/files/app/Main.hs b/tests/integration/tests/multi-test/files/myPackageA/app/Main.hs similarity index 100% rename from tests/integration/tests/multi-test/files/app/Main.hs rename to tests/integration/tests/multi-test/files/myPackageA/app/Main.hs diff --git a/tests/integration/tests/multi-test/files/package.yaml b/tests/integration/tests/multi-test/files/myPackageA/package.yaml similarity index 100% rename from tests/integration/tests/multi-test/files/package.yaml rename to tests/integration/tests/multi-test/files/myPackageA/package.yaml diff --git a/tests/integration/tests/multi-test/files/src/LibA.hs b/tests/integration/tests/multi-test/files/myPackageA/src/LibA.hs similarity index 100% rename from tests/integration/tests/multi-test/files/src/LibA.hs rename to tests/integration/tests/multi-test/files/myPackageA/src/LibA.hs diff --git a/tests/integration/tests/multi-test/files/test1/Main.hs b/tests/integration/tests/multi-test/files/myPackageA/test1/Main.hs similarity index 100% rename from tests/integration/tests/multi-test/files/test1/Main.hs rename to tests/integration/tests/multi-test/files/myPackageA/test1/Main.hs diff --git a/tests/integration/tests/multi-test/files/test2/Main.hs b/tests/integration/tests/multi-test/files/myPackageA/test2/Main.hs similarity index 100% rename from tests/integration/tests/multi-test/files/test2/Main.hs rename to tests/integration/tests/multi-test/files/myPackageA/test2/Main.hs diff --git a/tests/integration/tests/multi-test/files/test3/Main.hs b/tests/integration/tests/multi-test/files/myPackageA/test3/Main.hs similarity index 100% rename from tests/integration/tests/multi-test/files/test3/Main.hs rename to tests/integration/tests/multi-test/files/myPackageA/test3/Main.hs diff --git a/tests/integration/tests/multi-test/files/stack.yaml b/tests/integration/tests/multi-test/files/stack.yaml index 5ce27196df..14a33de5df 100644 --- a/tests/integration/tests/multi-test/files/stack.yaml +++ b/tests/integration/tests/multi-test/files/stack.yaml @@ -1,5 +1,6 @@ -snapshot: lts-24.37 +snapshot: ghc-9.10.3 + packages: -- . -- myPackageC +- myPackageA - myPackageB +- myPackageC