From c3554cd0a1e9a77b7fb59d00856f4879709b1577 Mon Sep 17 00:00:00 2001 From: sheaf Date: Mon, 29 Apr 2024 15:00:23 +0200 Subject: [PATCH] fixup test outputs --- Cabal/src/Distribution/Simple/SetupHooks/Errors.hs | 4 ++-- .../PackageTests/BuildAutogenPackageGuard/cabal.out | 8 ++++++-- .../use-local-package-as-setup-dep.out | 2 ++ cabal-testsuite/PackageTests/Exec/cabal.out | 2 ++ .../PackageTests/NewBuild/CmdRun/Script/cabal.out | 7 ------- .../PackageTests/NewBuild/CmdRun/Script/cabal.test.hs | 2 +- .../PackageTests/NewBuild/CmdRun/ScriptBad/cabal.out | 1 + .../PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out | 7 ------- .../NewBuild/CmdRun/ScriptLiterate/cabal.test.hs | 2 +- .../PackageTests/NewConfigure/ConfigFile/cabal.out | 1 + .../PackageTests/NewFreeze/BuildTools/new_freeze.out | 2 ++ .../PackageTests/Project/CoverageProject/cabal.out | 2 -- .../Project/CoverageProject/pkg-a/pkg-a.cabal | 1 + cabal-testsuite/PackageTests/Regression/T5318/install.out | 8 -------- .../PackageTests/Regression/T5318/install.test.hs | 2 +- cabal-testsuite/PackageTests/Regression/T6440/cabal.out | 3 --- .../PackageTests/Regression/T6440/cabal6440.cabal | 2 +- .../PackageTests/Regression/T7234/Fail/cabal.out | 1 + .../PackageTests/Regression/T7234/Success/cabal.out | 2 +- cabal-testsuite/PackageTests/Regression/T9640/cabal.out | 2 +- .../SetupHooks/SetupHooksCyclicRules/setup.out | 6 +++--- .../SetupHooks/SetupHooksDuplicateRuleId/setup.out | 4 ++-- 22 files changed, 29 insertions(+), 42 deletions(-) diff --git a/Cabal/src/Distribution/Simple/SetupHooks/Errors.hs b/Cabal/src/Distribution/Simple/SetupHooks/Errors.hs index 8a2b36a6c72..0fd44ac6feb 100644 --- a/Cabal/src/Distribution/Simple/SetupHooks/Errors.hs +++ b/Cabal/src/Distribution/Simple/SetupHooks/Errors.hs @@ -171,8 +171,8 @@ rulesExceptionMessage = \case DuplicateRuleId rId r1 r2 -> unlines $ [ "Duplicate pre-build rule (" <> show rId <> ")" - , " - " <> show r1 - , " - " <> show r2 + , " - " <> show (ruleBinary r1) + , " - " <> show (ruleBinary r2) ] locPath :: Location -> String diff --git a/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out index 512a50e37ee..36375ad1d98 100644 --- a/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out +++ b/cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out @@ -4,7 +4,11 @@ Build profile: -w ghc- -O1 In order, the following will be built: - pkg-0 (lib) (first run) Configuring library for pkg-0... +Error: [Cabal-7125] +Failed to build pkg-0-inplace. The failure occurred during the configure step. The exception was: + -----BEGIN CABAL OUTPUT----- Error: [Cabal-5559] [autogen-guard] To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. -Error: [Cabal-7125] -Failed to build pkg-0-inplace. The failure occurred during the configure step. +CallStack (from HasCallStack): + dieWithException, called at src/Distribution/Simple/Configure.hs:2674:10 in Cabal-3.13.0.0-inplace:Distribution.Simple.Configure + diff --git a/cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/use-local-package-as-setup-dep.out b/cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/use-local-package-as-setup-dep.out index 482ff118031..47abe672e28 100644 --- a/cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/use-local-package-as-setup-dep.out +++ b/cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/use-local-package-as-setup-dep.out @@ -1,6 +1,8 @@ # cabal v2-update Downloading the latest package list from test-local-repo # cabal v2-build +The package description file setup-dep/setup-dep.cabal has warnings: setup-dep/setup-dep.cabal:4:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'. +The package description file pkg/pkg.cabal has warnings: pkg/pkg.cabal:4:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'. Resolving dependencies... Error: [Cabal-7107] Could not resolve dependencies: diff --git a/cabal-testsuite/PackageTests/Exec/cabal.out b/cabal-testsuite/PackageTests/Exec/cabal.out index 7ce2cfb90f0..8f04b39fb1a 100644 --- a/cabal-testsuite/PackageTests/Exec/cabal.out +++ b/cabal-testsuite/PackageTests/Exec/cabal.out @@ -6,5 +6,7 @@ In order, the following will be built: Configuring my-0.1... Preprocessing executable 'my-executable' for my-0.1... Building executable 'my-executable' for my-0.1... +Preprocessing library for my-0.1... +Building library for my-0.1... # my my-executable This is my-executable diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out index 936db57d6be..e69de29bb2d 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out @@ -1,7 +0,0 @@ -# cabal v2-run -Resolving dependencies... -Build profile: -w ghc- -O1 -In order, the following will be built: - - fake-package-0 (exe:script-script.hs) (first run) -Configuring executable 'script-script.hs' for fake-package-0... -Building executable 'script-script.hs' for fake-package-0... diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs index 045c88117d7..b4a7bcfeb3f 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs @@ -1,6 +1,6 @@ import Test.Cabal.Prelude -main = cabalTest $ do +main = cabalTest $ recordMode DoNotRecord $ do res <- cabal' "v2-run" ["script.hs"] assertOutputContains "Hello World" res diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptBad/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptBad/cabal.out index be36f8398e0..7f814828c6b 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptBad/cabal.out +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptBad/cabal.out @@ -1,3 +1,4 @@ # cabal v2-run +The package description file ./script.cabal has warnings: script.cabal:0:0: A package using 'cabal-version: >=1.10' must use section syntax. See the Cabal user guide for details. Error: [Cabal-7121] Failed extracting script block: `{- cabal:` start marker not found diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out index 0615cc31a41..e69de29bb2d 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out @@ -1,7 +0,0 @@ -# cabal v2-run -Resolving dependencies... -Build profile: -w ghc- -O1 -In order, the following will be built: - - fake-package-0 (exe:script-script.lhs) (first run) -Configuring executable 'script-script.lhs' for fake-package-0... -Building executable 'script-script.lhs' for fake-package-0... diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs index 64c858e8d0d..e7ae8bfc4c6 100644 --- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs @@ -1,5 +1,5 @@ import Test.Cabal.Prelude -main = cabalTest $ do +main = cabalTest $ recordMode DoNotRecord $ do res <- cabal' "v2-run" ["script.lhs"] assertOutputContains "Hello World" res diff --git a/cabal-testsuite/PackageTests/NewConfigure/ConfigFile/cabal.out b/cabal-testsuite/PackageTests/NewConfigure/ConfigFile/cabal.out index f26ed6aac4d..eea324a7b57 100644 --- a/cabal-testsuite/PackageTests/NewConfigure/ConfigFile/cabal.out +++ b/cabal-testsuite/PackageTests/NewConfigure/ConfigFile/cabal.out @@ -1,4 +1,5 @@ # cabal v2-configure +The package description file ./ConfigFile.cabal has warnings: ConfigFile.cabal:0:0: A package using 'cabal-version: >=1.10' must use section syntax. See the Cabal user guide for details. Config file not written due to flag(s). # cabal v2-configure Config file not written due to flag(s). diff --git a/cabal-testsuite/PackageTests/NewFreeze/BuildTools/new_freeze.out b/cabal-testsuite/PackageTests/NewFreeze/BuildTools/new_freeze.out index ff47b1dd0cc..7c416897ad2 100644 --- a/cabal-testsuite/PackageTests/NewFreeze/BuildTools/new_freeze.out +++ b/cabal-testsuite/PackageTests/NewFreeze/BuildTools/new_freeze.out @@ -1,6 +1,7 @@ # cabal v2-update Downloading the latest package list from test-local-repo # cabal v2-build +The package description file ./my-local-package.cabal has warnings: my-local-package.cabal:3:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'. Resolving dependencies... Build profile: -w ghc- -O1 In order, the following would be built: @@ -12,6 +13,7 @@ In order, the following would be built: Resolving dependencies... Wrote freeze file: /cabal.project.freeze # cabal v2-build +The package description file ./my-local-package.cabal has warnings: my-local-package.cabal:3:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'. Resolving dependencies... Build profile: -w ghc- -O1 In order, the following would be built: diff --git a/cabal-testsuite/PackageTests/Project/CoverageProject/cabal.out b/cabal-testsuite/PackageTests/Project/CoverageProject/cabal.out index 1278857b31d..f6afdb5e560 100644 --- a/cabal-testsuite/PackageTests/Project/CoverageProject/cabal.out +++ b/cabal-testsuite/PackageTests/Project/CoverageProject/cabal.out @@ -5,11 +5,9 @@ In order, the following will be built: - pkg-a-0.1 (lib) (first run) - pkg-a-0.1 (test:testing) (first run) Configuring library for pkg-a-0.1... -Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. Preprocessing library for pkg-a-0.1... Building library for pkg-a-0.1... Configuring test suite 'testing' for pkg-a-0.1... -Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. Preprocessing test suite 'testing' for pkg-a-0.1... Building test suite 'testing' for pkg-a-0.1... Running 1 test suites... diff --git a/cabal-testsuite/PackageTests/Project/CoverageProject/pkg-a/pkg-a.cabal b/cabal-testsuite/PackageTests/Project/CoverageProject/pkg-a/pkg-a.cabal index 4a064d3389c..c6c44432201 100644 --- a/cabal-testsuite/PackageTests/Project/CoverageProject/pkg-a/pkg-a.cabal +++ b/cabal-testsuite/PackageTests/Project/CoverageProject/pkg-a/pkg-a.cabal @@ -18,6 +18,7 @@ library test-suite testing type: exitcode-stdio-1.0 build-depends: base, pkg-a + default-language: Haskell2010 main-is: Main.hs hs-source-dirs: test diff --git a/cabal-testsuite/PackageTests/Regression/T5318/install.out b/cabal-testsuite/PackageTests/Regression/T5318/install.out index 9c47fdc6b50..e69de29bb2d 100644 --- a/cabal-testsuite/PackageTests/Regression/T5318/install.out +++ b/cabal-testsuite/PackageTests/Regression/T5318/install.out @@ -1,8 +0,0 @@ -# cabal v1-install -Resolving dependencies... -Configuring empty-data-dir-0... -Preprocessing executable 'foo' for empty-data-dir-0... -Building executable 'foo' for empty-data-dir-0... -Installing executable foo in -Warning: The directory /install.dist/home/.cabal/bin is not in the system search path. -Completed empty-data-dir-0 diff --git a/cabal-testsuite/PackageTests/Regression/T5318/install.test.hs b/cabal-testsuite/PackageTests/Regression/T5318/install.test.hs index 6fd409c2704..3efaca5c05a 100644 --- a/cabal-testsuite/PackageTests/Regression/T5318/install.test.hs +++ b/cabal-testsuite/PackageTests/Regression/T5318/install.test.hs @@ -1,3 +1,3 @@ import Test.Cabal.Prelude -main = cabalTest $ +main = cabalTest $ recordMode DoNotRecord $ cabal "v1-install" [] diff --git a/cabal-testsuite/PackageTests/Regression/T6440/cabal.out b/cabal-testsuite/PackageTests/Regression/T6440/cabal.out index 5c24cecf81f..23cfe47a187 100644 --- a/cabal-testsuite/PackageTests/Regression/T6440/cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T6440/cabal.out @@ -6,15 +6,12 @@ In order, the following will be built: - cabal6440-0.1 (lib) (first run) - cabal6440-0.1 (test:tests) (first run) Configuring library 'intern6440' for cabal6440-0.1... -Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. Preprocessing library 'intern6440' for cabal6440-0.1... Building library 'intern6440' for cabal6440-0.1... Configuring library for cabal6440-0.1... -Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. Preprocessing library for cabal6440-0.1... Building library for cabal6440-0.1... Configuring test suite 'tests' for cabal6440-0.1... -Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. Preprocessing test suite 'tests' for cabal6440-0.1... Building test suite 'tests' for cabal6440-0.1... Running 1 test suites... diff --git a/cabal-testsuite/PackageTests/Regression/T6440/cabal6440.cabal b/cabal-testsuite/PackageTests/Regression/T6440/cabal6440.cabal index 42192a71672..1af78b1545b 100644 --- a/cabal-testsuite/PackageTests/Regression/T6440/cabal6440.cabal +++ b/cabal-testsuite/PackageTests/Regression/T6440/cabal6440.cabal @@ -13,7 +13,7 @@ library intern6440 exposed-modules: Inn build-depends: base hs-source-dirs: srcint - + default-language: Haskell2010 test-suite tests main-is: Main.hs diff --git a/cabal-testsuite/PackageTests/Regression/T7234/Fail/cabal.out b/cabal-testsuite/PackageTests/Regression/T7234/Fail/cabal.out index 5c8ed7ba2c5..c619a353947 100644 --- a/cabal-testsuite/PackageTests/Regression/T7234/Fail/cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T7234/Fail/cabal.out @@ -1,4 +1,5 @@ # cabal v2-build +The package description file ./issue7234.cabal has warnings: issue7234.cabal:13:3: The field "other-extensions" is available only since the Cabal specification version 1.10. Resolving dependencies... Error: [Cabal-7107] Could not resolve dependencies: diff --git a/cabal-testsuite/PackageTests/Regression/T7234/Success/cabal.out b/cabal-testsuite/PackageTests/Regression/T7234/Success/cabal.out index a0c85309b1f..e78929873d3 100644 --- a/cabal-testsuite/PackageTests/Regression/T7234/Success/cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T7234/Success/cabal.out @@ -1,9 +1,9 @@ # cabal v2-build +The package description file ./issue7234.cabal has warnings: issue7234.cabal:14:3: The field "other-extensions" is available only since the Cabal specification version 1.10. Resolving dependencies... Build profile: -w ghc- -O1 In order, the following will be built: - issue7234-0 (lib) (first run) -Warning: issue7234.cabal:14:3: The field "other-extensions" is available only since the Cabal specification version 1.10. Configuring library for issue7234-0... Preprocessing library for issue7234-0... Building library for issue7234-0... diff --git a/cabal-testsuite/PackageTests/Regression/T9640/cabal.out b/cabal-testsuite/PackageTests/Regression/T9640/cabal.out index 4c0f119823f..11efd4d4bef 100644 --- a/cabal-testsuite/PackageTests/Regression/T9640/cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T9640/cabal.out @@ -1,6 +1,7 @@ # cabal v2-update Downloading the latest package list from test-local-repo # cabal build +The package description file ./depend-on-custom-with-exe.cabal has warnings: depend-on-custom-with-exe.cabal:16:1: Ignoring trailing fields after sections: "ghc-options" Resolving dependencies... Build profile: -w ghc- -O1 In order, the following will be built: @@ -10,7 +11,6 @@ Configuring one-custom-0.1.0.0... Preprocessing library for one-custom-0.1.0.0... Building library for one-custom-0.1.0.0... Installing library in -Warning: depend-on-custom-with-exe.cabal:16:1: Ignoring trailing fields after sections: "ghc-options" Configuring library for depend-on-custom-with-exe-0.1.0.0... Preprocessing library for depend-on-custom-with-exe-0.1.0.0... Building library for depend-on-custom-with-exe-0.1.0.0... diff --git a/cabal-testsuite/PackageTests/SetupHooks/SetupHooksCyclicRules/setup.out b/cabal-testsuite/PackageTests/SetupHooks/SetupHooksCyclicRules/setup.out index 5076d3b207b..8791f703d62 100644 --- a/cabal-testsuite/PackageTests/SetupHooks/SetupHooksCyclicRules/setup.out +++ b/cabal-testsuite/PackageTests/SetupHooks/SetupHooksCyclicRules/setup.out @@ -3,9 +3,9 @@ Configuring setup-hooks-cyclic-rules-test-0.1.0.0... # Setup build Error: [Cabal-9077] Hooks: cycles in dependency structure of rules: - Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r3"})[0]] --> [setup.dist/work/dist/build/autogen/G3.hs] + Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r3"})[0]] --> [("setup.dist/work/dist/build/autogen","G3.hs")] - Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r2"})[0]] --> [setup.dist/work/dist/build/autogen/G1.hs] + Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r2"})[0]] --> [("setup.dist/work/dist/build/autogen","G1.hs")] | - `- Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r1"})[0]] --> [setup.dist/work/dist/build/autogen/G2.hs] + `- Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r1"})[0]] --> [("setup.dist/work/dist/build/autogen","G2.hs")] diff --git a/cabal-testsuite/PackageTests/SetupHooks/SetupHooksDuplicateRuleId/setup.out b/cabal-testsuite/PackageTests/SetupHooks/SetupHooksDuplicateRuleId/setup.out index 2a5f2e99d6f..d79de34eb95 100644 --- a/cabal-testsuite/PackageTests/SetupHooks/SetupHooksDuplicateRuleId/setup.out +++ b/cabal-testsuite/PackageTests/SetupHooks/SetupHooksDuplicateRuleId/setup.out @@ -3,5 +3,5 @@ Configuring setup-hooks-duplicate-rule-id-test-0.1.0.0... # Setup build Error: [Cabal-7717] Duplicate pre-build rule (RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (17,59)}, ruleName = "myRule"}) - - Rule: [] --> [src/A.hs] - - Rule: [] --> [src/B.hs] + - Rule: [] --> [("src","A.hs")] + - Rule: [] --> [("src","B.hs")]