Skip to content

Conversation

ulysses4ever
Copy link
Collaborator

@geekosaur help is welcome


Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@ulysses4ever
Copy link
Collaborator Author

I don't understand the current failure in CI

@geekosaur
Copy link
Collaborator

Bootstrap, at least, is using the latest Hackage release of Cabal instead of either the one with ghc or the one it just built from the repo, for some reason. I would suspect the latter is what's actually intended, since you're supposed to bootstrap from the repo. This implies to me that something's wrong with project-cabal/ghc-latest.config. I'll check the others now.

@geekosaur
Copy link
Collaborator

Same thing reported differently for validate:

<no location info>: error: [GHC-42258] [-Wunused-packages, Werror=unused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - Cabal-3.17.0.0 (exposed by flag -package-id Cabal-3.17.0.0-inplace)

again implying it's using the wrong Cabal, meaning project-cabal/ghc-latest.config is overriding the version.

@ulysses4ever ulysses4ever force-pushed the ci-add-ghc-9.14-alpha1 branch from beee078 to dc4a6f6 Compare August 21, 2025 01:11
@ulysses4ever
Copy link
Collaborator Author

haddock-project:dependencies (from integration-tests2) is failng for unclear reason.

  haddock-project
    dependencies:                              Build profile: -w ghc-9.14.0.20250819 -O1
In order, the following will be built (use -v for more details):
 - async-1.4 (lib:async) (requires download & build)
 - a-0.1.0.0 (lib) (first run)
Downloading  async-1.4
Downloaded   async-1.4
Warning: async.cabal:23:39: version operators used. To use version operators
the package needs to specify at least 'cabal-version: >= 1.8'.
Configuring async-1.4...
Warning: [git-protocol] Cloning over git:// might lead to an arbitrary code
execution vulnerability. Furthermore, popular forges like GitHub do not
support it. Use https:// or ssh:// instead.
Preprocessing library for async-1.4...
Building library for async-1.4...
[1 of 1] Compiling Control.Async    ( Control/Async.hs, dist/build/Control/Async.o, dist/build/Control/Async.dyn_o )
Preprocessing library for async-1.4...
Running Haddock on library for async-1.4...
Haddock coverage:
 100% (  8 /  8) in 'Control.Async'
Documentation created:
/home/runner/work/cabal/cabal/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/dist-newstyle/tmp/src-180892/async-1.4/dist/doc/html/async
Installing library in /home/runner/work/cabal/cabal/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/store/ghc-9.14.0.20250819-b437/incoming/new-180892/home/runner/work/cabal/cabal/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/store/ghc-9.14.0.20250819-b437/async-1.4-0f0aa9573235284cdecd4ff0d8c66f1bcb8614da2d3898b62f2ff1ca60141487/lib
Configuring library for a-0.1.0.0...
Preprocessing library for a-0.1.0.0...
Building library for a-0.1.0.0...
[1 of 1] Compiling MyLib            ( src/MyLib.hs, dist-newstyle/build/x86_64-linux/ghc-9.14.0.20250819/a-0.1.0.0/build/MyLib.o, dist-newstyle/build/x86_64-linux/ghc-9.14.0.20250819/a-0.1.0.0/build/MyLib.dyn_o )
src/MyLib.hs:3:1: error: [GHC-61948]
Error:     Could not find module ‘Control.Concurrent.Async’.
    Perhaps you meant
      Control.Concurrent.Chan (from base-4.22.0.0)
      Control.Concurrent.STM (needs flag -package-id stm-2.5.3.1)
      Control.Concurrent.MVar (from base-4.22.0.0)
    Use -v to see a list of the files searched for.
  |
3 | import Control.Concurrent.Async
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

FAIL
      Exception: Error: [Cabal-7125]
      Failed to build a-0.1.0.0.
      
      Use -p '/dependencies/' to rerun this test only.

@ulysses4ever
Copy link
Collaborator Author

So, this cabal-install integration test calls the haddock-project action to check that haddocks of dependencies are indeed built (given all the right flags like documentation: true). For that purpose it uses a dummy local package that depends on the async package. The dummy package imports Control.Concurrent.Async, which is present in the recent versions of async but wasn't there in async-1.4, which solver decided to pick (current async is 2.2.5, and 1.4 was uploaded in 2011). I'm guessing, normally (wich prior GHCs) we get more recent asyncs that have the module.

The question is then: why moving to GHC 9.14-alpha1 made solver pick an acient async?

@ulysses4ever
Copy link
Collaborator Author

ulysses4ever commented Aug 21, 2025

the answer seems to be: that was the last version of async that didn't have an upper bound on base. I think we should switch to a boot package, for which we have a much lower chance of running in something like this.

@ulysses4ever
Copy link
Collaborator Author

all right, it's gotten to the meat of it, cli-suite, and a bunch of tests fail. Raw log: https://github.com/haskell/cabal/commit/6e603722b4e702b5a75e8cf180a4830b483215f4/checks/48593991452/logs (it can't display them because something is printing "quick brown fox jumps..." a zillion times: we should reconsider that test!)

@ulysses4ever
Copy link
Collaborator Author

232 tests, it looks. I don't remember such a fallout...

PackageTests/Install/ProgramAffixes/overwrite-policy.test.hs
PackageTests/Get/OnlyDescription/cabal.test.hs
PackageTests/Get/T7248/cabal.test.hs
PackageTests/CustomWithoutCabal/cabal.test.hs
PackageTests/RelativePathProjectImports/cabal.test.hs
PackageTests/ConditionalAndImport/cabal.test.hs
PackageTests/ExtraProgPathLocal/setup.test.hs
PackageTests/NewSdist/MultiTarget/multi-list-sources.test.hs
PackageTests/NewSdist/MultiTarget/valid-and-test-suite.test.hs
PackageTests/NewSdist/MultiTarget/all-output-dir.test.hs
PackageTests/NewSdist/MultiTarget/list-sources-output-dir.test.hs
PackageTests/NewSdist/MultiTarget/all-test-sute.test.hs
PackageTests/NewSdist/MultiTarget/target-remote-package.test.hs
PackageTests/NewSdist/MultiTarget/all.test.hs
PackageTests/NewSdist/MultiTarget/multi-archive-to-stdout.test.hs
PackageTests/Project/CoverageProject/cabal.test.hs
PackageTests/NewSdist/MultiTarget/multi-target.test.hs
PackageTests/NewSdist/DeterministicTrivial/deterministic.test.hs
PackageTests/NewSdist/NullTerminated/cabal.test.hs
PackageTests/NewSdist/Globbing/cabal.test.hs
PackageTests/ExternalCommandExitCode/cabal.test.hs
PackageTests/Configure/cabal.test.hs
PackageTests/HaddockArgsCombine/cabal.test.hs
PackageTests/GenBounds/Issue6290/cabal.test.hs
PackageTests/CmmSources/cabal.test.hs
PackageTests/ReplOptions/cabal.test.hs
PackageTests/ExtraPackages/cabal.test.hs
PackageTests/WithRepl/SimpleTests/cabal.test.hs
PackageTests/PackageDB/cabal-fail-no-p.test.hs
PackageTests/PackageDB/cabal-fail-no-base.test.hs
PackageTests/PackageDB/cabal-manual-packagedb.test.hs
PackageTests/PackageDB/cabal-packagedb.test.hs
PackageTests/PackageDB/cabal-fail-no-packagedbs.test.hs
PackageTests/TestCodeGenerator/cabal.test.hs
PackageTests/ProjectConfig/FlagsSemigroup/cabal.test.hs
PackageTests/ProjectConfig/FieldStanzaConfusion/cabal.test.hs
PackageTests/BuildTargets/UseLocalPackageForSetup/use-local-package-as-setup-dep.test.hs
PackageTests/BuildTargets/UseLocalPackage/use-local-version-of-package.test.hs
PackageTests/HaddockArgs/hoogle.test.hs
PackageTests/HaddockArgs/quickjump.test.hs
PackageTests/BuildToolDepends/setup.test.hs
PackageTests/Target/cabal.test.hs
PackageTests/InternalLibraries/cabal-per-package.test.hs
PackageTests/InternalLibraries/cabal.test.hs
PackageTests/Exec/cabal.test.hs
PackageTests/BuildToolDependsExternal/setup.test.hs
PackageTests/WarnEarlyOverwrite/dirty-install.test.hs
PackageTests/WarnEarlyOverwrite/clean-install-by-copy.test.hs
PackageTests/WarnEarlyOverwrite/clean-install-by-symlink.test.hs
PackageTests/Regression/T4202/cabal.test.hs
PackageTests/Regression/T5318/install.test.hs
PackageTests/Regression/T5318/sdist-list-sources.test.hs
PackageTests/Regression/T3932/cabal.test.hs
PackageTests/Regression/T4986/cabal.test.hs
PackageTests/Regression/T6961/DepInternal/cabal.test.hs
PackageTests/Regression/T6961/Test/cabal.test.hs
PackageTests/Regression/T6961/Exe/cabal.test.hs
PackageTests/Regression/T5309/cabal.test.hs
PackageTests/Regression/T6961/DepExternal/cabal.test.hs
PackageTests/Regression/T9756/cabal.test.hs
PackageTests/Regression/T6440/cabal.test.hs
PackageTests/Regression/T8507/cabal.test.hs
PackageTests/Regression/T5213/cabal.test.hs
PackageTests/Regression/T4798/cabal.test.hs
PackageTests/Regression/T5213ExeCoverage/cabal.test.hs
PackageTests/Regression/T9640/cabal.test.hs
PackageTests/Regression/T4154/install-time-with-constraint.test.hs
PackageTests/Regression/T7234/Success/cabal.test.hs
PackageTests/Regression/T7234/Fail/cabal.test.hs
PackageTests/Regression/T6334/cabal.test.hs
PackageTests/Regression/T4720/cabal.test.hs
PackageTests/Regression/T6853/cabal.test.hs
PackageTests/Regression/T5409/use-different-versions-of-dependency-for-library-and-build-tool.test.hs
PackageTests/Regression/T5677/cabal.test.hs
PackageTests/postCheckoutCommand/cabal.test.hs
PackageTests/ExternalCommand/cabal.test.hs
PackageTests/CmmSourcesDyn/cabal.test.hs
PackageTests/IndexCabalFileParseError/cabal.test.hs
PackageTests/MultiRepl/KeepTempFiles/cabal.test.hs
PackageTests/MultiRepl/CustomSetupKeepTempFiles/cabal.test.hs
PackageTests/MultiRepl/ExtraOptions/cabal.test.hs
PackageTests/MultiRepl/EnabledSucc/cabal.test.hs
PackageTests/MultiRepl/EnabledClosure/cabal.test.hs
PackageTests/MultiRepl/NotEnabledFail/cabal.test.hs
PackageTests/MultiRepl/InternalLibs/cabal.test.hs
PackageTests/MultiRepl/CabalMacros/cabal.test.hs
PackageTests/NewHaddock/DisableDoc/cabal.test.hs
PackageTests/NewHaddock/ImplyDependencies/cabal.test.hs
PackageTests/NewHaddock/HaddockOutput/HaddockOutputConfig/cabal.test.hs
PackageTests/NewHaddock/HaddockOutput/HaddockForHackageCmdOutput/cabal.test.hs
PackageTests/NewHaddock/HaddockOutput/HaddockOutputCmd/cabal.test.hs
PackageTests/NewHaddock/Fails/cabal.test.hs
PackageTests/JS/JSPPOptions/other-arch.test.hs
PackageTests/ReplNoLoad/cabal.test.hs
PackageTests/JS/JsSourcesExe/other-arch.test.hs
PackageTests/JS/JsSources/other-arch.test.hs
PackageTests/JS/GhcOptions/other-arch.test.hs
PackageTests/Backpack/Reexport2/cabal.test.hs
PackageTests/Backpack/Includes2/cabal-external.test.hs
PackageTests/Backpack/Includes2/cabal-internal-target.test.hs
PackageTests/Backpack/Includes2/cov.test.hs
PackageTests/Backpack/Includes2/cabal-internal.test.hs
PackageTests/Backpack/Includes2/cabal-external-target.test.hs
PackageTests/Backpack/Includes3/cabal-external.test.hs
PackageTests/Backpack/Includes3/cabal-repo.test.hs
PackageTests/Backpack/Includes3/cabal-internal.test.hs
PackageTests/Backpack/T6385/cabal.test.hs
PackageTests/Backpack/bkpcabal01/cabal.test.hs
PackageTests/BuildTypeConfigure/Component/cabal.test.hs
PackageTests/HaddockBuildDepends/cabal.test.hs
PackageTests/OfflineFlag/offlineFlag.test.hs
PackageTests/SDist/T8817/cabal.test.hs
PackageTests/SDist/T7124/cabal-list.test.hs
PackageTests/SDist/T7124/cabal.test.hs
PackageTests/SDist/T7698/cabal.test.hs
PackageTests/SDist/T7028/cabal.test.hs
PackageTests/SDist/T5195and5349/cabal.test.hs
PackageTests/CustomTestCoverage/cabal.test.hs
PackageTests/CustomSegfault/cabal.test.hs
PackageTests/BuildTools/Internal/cabal.test.hs
PackageTests/BuildTools/External/cabal.test.hs
PackageTests/Outdated/outdated.test.hs
PackageTests/Outdated/outdated_freeze.test.hs
PackageTests/Outdated/outdated-project-file.test.hs
PackageTests/Outdated/Issue8283/cabal.test.hs
PackageTests/ExecModern/cabal.test.hs
PackageTests/Freeze/enable-benchmarks.test.hs
PackageTests/Freeze/dry-run.test.hs
PackageTests/Freeze/enable-tests.test.hs
PackageTests/Freeze/disable-tests.test.hs
PackageTests/Freeze/freeze.test.hs
PackageTests/Freeze/disable-benchmarks.test.hs
PackageTests/ExecCommand/cabal.test.hs
PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
PackageTests/ExtraProgPathGlobal/setup.test.hs
PackageTests/NewFreeze/Flags/new_freeze.test.hs
PackageTests/NewFreeze/BuildTools/new_freeze.test.hs
PackageTests/NewFreeze/FreezeFile/new_freeze.test.hs
PackageTests/ExternalCommandHelp/cabal.test.hs
PackageTests/ShowBuildInfo/Complex/single.test.hs
PackageTests/ProjectImport/ParseErrorProvenance/cabal.test.hs
PackageTests/ProjectImport/ParseWarningProvenance/cabal.test.hs
PackageTests/ShowBuildInfo/CompileFail/compile-fail.test.hs
PackageTests/ShowBuildInfo/A/build-info-all.test.hs
PackageTests/ShowBuildInfo/A/build-info-exe.test.hs
PackageTests/ShowBuildInfo/A/remove-outdated.test.hs
PackageTests/Init/init-interactive-ghc2021.test.hs
PackageTests/Init/init-without-git.test.hs
PackageTests/Init/init-interactive.test.hs
PackageTests/Init/init-interactive-empty-folder.test.hs
PackageTests/Init/init.test.hs
PackageTests/Init/init-backup.test.hs
PackageTests/Init/init-interactive-legacy.test.hs
PackageTests/Init/init-legacy.test.hs
PackageTests/NewConfigure/LocalConfigOverwrite/cabal.test.hs
PackageTests/NewConfigure/ConfigFile/cabal.test.hs
PackageTests/ExtraProgPath/setup.test.hs
PackageTests/MultipleLibraries/T6894/cabal.test.hs
PackageTests/MultipleLibraries/T6083PostMixin/cabal.test.hs
PackageTests/MultipleLibraries/T6083PreMixin/cabal.test.hs
PackageTests/MultipleLibraries/Successful/cabal.test.hs
PackageTests/MultipleLibraries/T6083Post/cabal.test.hs
PackageTests/MultipleLibraries/Failing/cabal.test.hs
PackageTests/MultipleLibraries/T6083Pre/cabal.test.hs
PackageTests/BuildDeps/DepCycle/cabal.test.hs
PackageTests/AutoconfBadPaths/cabal.test.hs
PackageTests/BuildDeps/InternalLibrary1/cabal.test.hs
PackageTests/ExternalCommandEnv/cabal.test.hs
PackageTests/TestSuiteTests/ExeV10/coverage.test.hs
PackageTests/TestSuiteTests/ExeV10/cabal.test.hs
PackageTests/CustomWithoutCabalDefaultMain/cabal.test.hs
PackageTests/ListBin/SelectedComponent/cabal.test.hs
PackageTests/ListBin/Script/cabal.test.hs
PackageTests/Path/All/cabal.test.hs
PackageTests/Path/Config/cabal.test.hs
PackageTests/NewBuild/CmdRun/ExitCodePropagation/cabal.test.hs
PackageTests/Path/Compiler/cabal.test.hs
PackageTests/NewBuild/CmdRun/MultiplePackages/cabal.test.hs
PackageTests/NewBuild/CmdRun/MultipleExes/cabal.test.hs
PackageTests/NewBuild/CmdRun/Single/cabal.test.hs
PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs
PackageTests/NewBuild/CmdRun/Datafiles/cabal.test.hs
PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs
PackageTests/NewBuild/CmdRun/RunMainBad/cabal.test.hs
PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs
PackageTests/NewBuild/CmdRun/ScriptBad/cabal.test.hs
PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs
PackageTests/NewBuild/CmdRun/NoContext/cabal.test.hs
PackageTests/NewBuild/CmdRun/Script/cabal.test.hs
PackageTests/NewBuild/CmdRun/WarningRTS/cabal.test.hs
PackageTests/NewBuild/CmdRun/ExeAndLib/cabal.test.hs
PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs
PackageTests/NewBuild/CmdClean/CleanSourceRepositoryPackage/cabal.test.hs
PackageTests/NewBuild/CmdClean/Script/cabal.test.hs
PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs
PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.test.hs
PackageTests/NewBuild/CmdBuild/OnlyConfigure/cabal.test.hs
PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.test.hs
PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs
PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs
PackageTests/NewBuild/T4477/cabal.test.hs
PackageTests/NewBuild/T3978/cabal.test.hs
PackageTests/NewBuild/T8875/cabal.test.hs
PackageTests/NewBuild/CmdRepl/ScriptRerun/cabal.test.hs
PackageTests/NewBuild/MonitorCabalFiles/cabal.test.hs
PackageTests/NewBuild/CmdRepl/Script/cabal.test.hs
PackageTests/NewBuild/T4405/cabal.test.hs
PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs
PackageTests/NewBuild/CmdBench/MultipleBenchmarks/cabal.test.hs
PackageTests/NewBuild/CmdBench/WarningRTS/cabal.test.hs
PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs
PackageTests/NewBuild/CmdTest/WarningRTS/cabal.test.hs
PackageTests/NewBuild/CustomSetup/LocalPackageWithCustomSetup/build-local-package-with-custom-setup.test.hs
PackageTests/NewBuild/CustomSetup/RemotePackageWithCustomSetup/build-package-from-repo-with-custom-setup.test.hs
PackageTests/NewBuild/T4017/cabal.test.hs
PackageTests/NewBuild/CmdExec/GhcInvocation/cabal.test.hs
PackageTests/NewBuild/CmdExec/RunExe/cabal.test.hs
PackageTests/CopyHie/cabal.test.hs
PackageTests/HaddockProject/haddock-project.test.hs
PackageTests/HaddockWarn/cabal.test.hs
PackageTests/VersionPriority/3-web.test.hs
PackageTests/VersionPriority/1-web.test.hs
PackageTests/VersionPriority/0-local.test.hs
PackageTests/VersionPriority/2-local.test.hs
PackageTests/VersionPriority/1-local.test.hs
PackageTests/VersionPriority/2-web.test.hs
PackageTests/BuildAutogenPackageGuard/cabal.test.hs
PackageTests/ConfigFile/T7705/cabal.test.hs
PackageTests/ConfigFile/T8487/cabal.test.hs
PackageTests/CmmSourcesExe/cabal.test.hs
PackageTests/FFI/ForeignOptsC/cabal.test.hs
PackageTests/FFI/CSourceDependsStub/cabal.test.hs
PackageTests/FFI/ForeignOptsCxx/cabal.test.hs

@ulysses4ever
Copy link
Collaborator Author

I don't see any of these locally...

@geekosaur
Copy link
Collaborator

Trying it here. I don't make any promises, in particular I may not be around when it finishes because I need to do laundry this afternoon.

@geekosaur
Copy link
Collaborator

I found multiple tests which are apparently forcing hashable-1.4.2.0 in CI, whereas ghc-latest.config is forcing hashable-1.4.3.0.

@geekosaur
Copy link
Collaborator

Okay, validate passes here (using the 9.14 prerelease) as well, so it's something about our CI.

@geekosaur
Copy link
Collaborator

The Windows failures are peculiar: it looks like the test suites pass, then afterward we get that annoying ghci error exit twice followed by "process exited with code 1".

@geekosaur
Copy link
Collaborator

ping @jasagredo re Windows CI failures?

@ulysses4ever
Copy link
Collaborator Author

I wonder if it's the (GHA) cache...

@ulysses4ever
Copy link
Collaborator Author

I'm seeing a bunch of

+Warning: Both <ROOT>/overwrite-policy.dist/home/.cabal and /home/runner/.config/cabal/config exist - ignoring the former.
+It is advisable to remove one of them. In that case, we will use the remaining one by default (unless '$CABAL_DIR' is explicitly set).

in the raw logs I referenced above.

@geekosaur
Copy link
Collaborator

That's been going on for a while now.

@geekosaur
Copy link
Collaborator

geekosaur commented Aug 21, 2025

#11023 may be related, since validate now uses CABAL_DIR to force a known configuration.

@jasagredo
Copy link
Collaborator

jasagredo commented Aug 21, 2025

ping @jasagredo re Windows CI failures?

I'm sorry but I am quite busy at least until the end of September, so I'm afraid I won't be able to spend time on this more than just give it a very brief look.

Also in the past I fixed numerous things in the package tests, but not in the integration tests and just skimming over the CI logs it seems the error is in the latter.

Like 2630 on the GHC 9.8.4 on Windows job shows:

      File `haddocks\text\text.haddock` does not exist.
      Use -p '/dependencies/' to rerun this test only.

@ulysses4ever
Copy link
Collaborator Author

Like 2630 on the GHC 9.8.4 on Windows job shows:

 File `haddocks\text\text.haddock` does not exist.
 Use -p '/dependencies/' to rerun this test only.

Umh, I just touched this test, and the update version passes on Linux...

@geekosaur geekosaur force-pushed the ci-add-ghc-9.14-alpha1 branch from 6e60372 to 6971ed8 Compare August 23, 2025 20:29
@geekosaur
Copy link
Collaborator

So, maybe some Hackage revision issue prevented the original CI run from working, but it got fixed before we tried it locally? But I didn't cabal update before running it….

And we still have the Windows failures… but only on the older versions. Now I'm curious as to whether the job Mergify is currently running will pass.

@geekosaur
Copy link
Collaborator

Looks like it succeeded, so something in here is causing it. But only for older Windows. ❓

@geekosaur
Copy link
Collaborator

This gets stranger all the time: now we got a bunch of those double-config warnings, but only on 9.14-alpha1.
Also, it seems 9.14alpha1 is significantly slower than other versions.

@geekosaur
Copy link
Collaborator

And my hack didn't fix it anyway.

@geekosaur
Copy link
Collaborator

So I'm still getting 3 local fails, none of which are the ones in CI; all three are 502s from stackage.org which appear to possibly be a problem with my local Cloudflare mirror.

@geekosaur geekosaur force-pushed the ci-add-ghc-9.14-alpha1 branch from 7efb3c2 to 83980e9 Compare August 24, 2025 00:57
@geekosaur
Copy link
Collaborator

And I still see nothing in the diffs that would introduce a build error only with old ghcs on Windows.

@ulysses4ever
Copy link
Collaborator Author

I think the Windows failures might have to do with how boot libraries were cooked for Windows during that age (GHC 9.{4,6,8}, our current failures). Compare a successful Ubuntu run to a failed WIndows one:

1,2c1
<     haddock-project
<       dependencies:                              Build profile: -w ghc-9.14.0.20250819 -O1
---
>        dependencies:                              Build profile: -w ghc-9.4.8 -O1
8c7
<   [1 of 1] Compiling MyLib            ( src/MyLib.hs, dist-newstyle/build/x86_64-linux/ghc-9.14.0.20250819/a-0.1.0.0/build/MyLib.o, dist-newstyle/build/x86_64-linux/ghc-9.14.0.20250819/a-0.1.0.0/build/MyLib.dyn_o )
---
>   [1 of 1] Compiling MyLib            ( src\MyLib.hs, dist-newstyle\build\x86_64-windows\ghc-9.4.8\a-0.1.0.0\build\MyLib.o )
11c10,14
<   Haddock coverage:
---
>   Warning: The following packages have no Haddock documentation installed. No
>   links will be generated to these packages: array-0.5.4.0, base-4.17.2.1,
>   binary-0.8.9.1, bytestring-0.11.5.3, containers-0.6.7, deepseq-1.4.8.0,
>   ghc-bignum-1.3, ghc-boot-th-9.4.8, ghc-prim-0.9.1, pretty-1.1.3.6,
>   template-haskell-2.19.0.0, text-2.0.2
15c18,21
<       someFunc
---
>       someFunc (src\MyLib.hs:5)
>   Warning: MyLib: could not find link destinations for:
>
>   	- GHC.Types.IO
17,19c23
<   /home/runner/work/cabal/cabal/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/./dist-newstyle/build/x86_64-linux/ghc-9.14.0.20250819/a-0.1.0.0/doc/html/a
<   [1 of 1] Compiling MyLib            ( src/MyLib.hs, nothing ) [HIE file is missing]
<   Haddock coverage:
---
>   D:\a\cabal\cabal\cabal-install\tests\IntegrationTests2\haddock-project\dependencies\.\dist-newstyle\build\x86_64-windows\ghc-9.4.8\a-0.1.0.0\doc\html\a
23,24c27,34
<       someFunc (src/MyLib.hs:6)
<   OK (9.56s)
---
>       someFunc (src\MyLib.hs:5)
>   Warning: MyLib: could not find link destinations for:
>
>   	- GHC.Types.IO
>   FAIL (7.21s)
>         tests\IntegrationTests2.hs:2816:
>         File `haddocks\text\text.haddock` does not exist.
>         Use -p '/dependencies/' to rerun this test only.

My thought is that we should skip this test on these older Windows configurations.

@geekosaur
Copy link
Collaborator

Well, I think you just saved me trying to set up a (headless since vbox doesn't seem to like me) Windows VM and bisect what commit caused it, at least. Maybe we can try something other than text since I'm vaguely recalling it has some build complications on Windows anyway.

@ulysses4ever
Copy link
Collaborator Author

@geekosaur yes, trying something other than text did cross my mind. The issue is: I'm afraid we'll be back to square one where we were with async: other boot libraries won't help by the looks of the Haddock warning message, so it'll have to be a non-boot package, like async. Do you agree?

The proper way to fix it (I think) would be to move the test to convert it to a proper PackageTest (incabal-testsuite), and use withRemoteRepo to provide a global package from our own sandbox. But I don't feel energy to do that atm.

@geekosaur
Copy link
Collaborator

text is included in the warning, so I'd imagine any other package in the list would also work? And I'm somewhat averse to disabling tests without good reason because they never really get retried, much less fixed, as far as I can see.

@ulysses4ever
Copy link
Collaborator Author

I meant:

Warning: The following packages have no Haddock documentation installed. No
links will be generated to these packages: array-0.5.4.0, base-4.17.2.1,
binary-0.8.9.1, bytestring-0.11.5.3, containers-0.6.7, deepseq-1.4.8.0,
ghc-bignum-1.3, ghc-boot-th-9.4.8, ghc-prim-0.9.1, pretty-1.1.3.6,
template-haskell-2.19.0.0, text-2.0.2

trying time now

@geekosaur
Copy link
Collaborator

geekosaur commented Aug 25, 2025

So did I; text is right at the end of it, implying that if text is a suitable test then so is anything else listed.

@ulysses4ever
Copy link
Collaborator Author

Same result. I suspected the warning message is just being lazy and doesn't mention all boot libraries, but it seems like the issue will arise with any of those.

We're back to the question: should we

  1. disable the test for these configurations, or
  2. convert it to PackageTests and make sure we supply a remote package from a sandbox, or
  3. go back to a global package from Hackage and pick one that we think won't fall for the same issue as async did (not updating the base bound in time).

@geekosaur do you think you could spare some energy on (2)? I truly think it's the only proper fix but I'm running out of cabal time budget...

@geekosaur
Copy link
Collaborator

I'm finally looking at this, and I think we might have a problem: there are tests that fail with documentation: True (which is why I modified the test suite to use a pristine cabal config), so if this needs documentation: True for whatever library it's using (which I presume it does since it's a haddock test) we may trigger other test failures if I enable documentation for a package in the test suite's store. Which means we need to use something safe from Hackage.

@geekosaur
Copy link
Collaborator

Come to think of it, I'm not sure adding documentation for anything in the private store is safe, since I would expect its existence to mean Hackage installs also go there. (That being said, async didn't cause such problems; the test only failed on my system where everything is installed with documentation: True.)

In any case, it may be better to just concede that older ghc versions need to be skipped on Windows.

@geekosaur geekosaur force-pushed the ci-add-ghc-9.14-alpha1 branch 2 times, most recently from 3031235 to 05a8050 Compare August 28, 2025 22:27
@ulysses4ever ulysses4ever marked this pull request as ready for review September 2, 2025 13:57
@ulysses4ever
Copy link
Collaborator Author

Works for me, thank you for working on this!

We're ready for review now! 🎉

@ulysses4ever ulysses4ever force-pushed the ci-add-ghc-9.14-alpha1 branch from 05a8050 to 3c3a3fa Compare September 2, 2025 13:58
Copy link
Member

@Mikolaj Mikolaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

the test was using async from hackage as an exmaple global package.
Currently, async has a too restrictive upper bound on base. It'll be
more robust to rely on a boot package instead. Ideally we'd not rely on
anything from Hackage in tests, but that's an issue for another day.

Also, disable haddock-project on older Windows

It fails for an unknown reason; possibly the output is in the wrong
place compared to where the test looks, but tooling gets it right.
- Update ghc-latest.config: 9.12 -> 9.14
- ghc-latest.config: allow-newer:
  - binary
  - containers
  - ghc-bignum
@ulysses4ever ulysses4ever added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Sep 11, 2025
@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Sep 11, 2025
@ulysses4ever ulysses4ever removed the merge me Tell Mergify Bot to merge label Sep 12, 2025
@ulysses4ever
Copy link
Collaborator Author

ulysses4ever commented Sep 12, 2025

It seems like alpha2 is around the corner, so I'll wait for it a bit. haskell/ghcup-metadata#329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous-integration ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants