[Git][ghc/ghc][wip/mangoiv/ci-stages] fixup! ci: build and test stage
by Magnus (@MangoIV) 05 Oct '26
by Magnus (@MangoIV) 05 Oct '26
05 Oct '26
Magnus pushed to branch wip/mangoiv/ci-stages at Glasgow Haskell Compiler / GHC
Commits:
ff5f5247 by mangoiv at 2026-10-05T14:26:20+02:00
fixup! ci: build and test stage
- - - - -
2 changed files:
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
Changes:
=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -844,7 +844,7 @@ instance ToJSON Job where
job :: Arch -> Opsys -> BuildConfig -> BuildAndTestJob Job
job arch opsys buildConfig =
MkBuildAndTestJob
- { buildJob = NamedJob { name = jobName, jobInfo = Job { jobScript = jobBuildScript, jobStage = "full-build", jobNeeds = [("hadrian-ghc-in-ghci", False)], ..} }
+ { buildJob = NamedJob { name = jobName, jobInfo = Job { jobScript = jobBuildScript, jobStage = "full-build", jobNeeds = [("hadrian-ghc-in-ghci", False)], jobArtifacts = buildJobArtifacts, ..} }
, testJobs =
NamedJob { name = jobName <> "-test", jobInfo = testJobInfo } :
[ NamedJob
@@ -855,7 +855,7 @@ job arch opsys buildConfig =
} }
| testsuiteUsePerf buildConfig ] }
where
- testJobInfo = Job {jobScript = jobTestScript, jobNeeds = [(jobName, True)], jobStage = "testing", ..}
+ testJobInfo = Job {jobScript = jobTestScript, jobNeeds = [(jobName, True)], jobStage = "testing", jobArtifacts = testJobArtifacts, ..}
jobPlatform = (arch, opsys)
jobRules = emptyRules jobName
@@ -952,7 +952,7 @@ job arch opsys buildConfig =
-- Keep in sync with the exclude list in `function clean()` in
-- `.gitlab/ci.sh`!
- jobArtifacts = Artifacts
+ buildJobArtifacts = Artifacts
{ junitReport = "junit.xml"
, expireIn = "2 weeks"
, artifactPaths = [binDistName arch opsys buildConfig ++ ".tar.xz"
@@ -961,6 +961,15 @@ job arch opsys buildConfig =
, artifactsWhen = ArtifactsAlways
}
+ -- don't reupload the bindist from the testsuite run
+ testJobArtifacts = Artifacts
+ { junitReport = "junit.xml"
+ , expireIn = "2 weeks"
+ , artifactPaths = ["junit.xml"
+ ,"unexpected-test-output.tar.gz"]
+ , artifactsWhen = ArtifactsAlways
+ }
+
jobCache
-- N.B. We have temporarily disabled cabal-install store caching on
-- Windows due to #21347.
=====================================
.gitlab/jobs.yaml
=====================================
@@ -77,7 +77,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-darwin-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -204,7 +203,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-linux-alpine3_23-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -328,7 +326,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-linux-deb11-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -451,7 +448,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-linux-deb12-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -678,7 +674,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-linux-deb12-wine-int_native-cross_aarch64-unknown-mingw32-validate+llvm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -760,7 +755,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-linux-deb12-wine-int_native-cross_aarch64-unknown-mingw32-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -966,7 +960,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-linux-deb13-validate+llvm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1027,7 +1020,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-aarch64-linux-deb13-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1151,7 +1143,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-i386-linux-alpine3_23-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1275,7 +1266,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-i386-linux-deb11-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1398,7 +1388,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-i386-linux-deb12-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1521,7 +1510,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-i386-linux-deb13-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1649,7 +1637,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-darwin-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1778,7 +1765,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-linux-alpine3_23-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -1904,7 +1890,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-linux-deb11-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2029,7 +2014,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-linux-deb12-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2259,7 +2243,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-linux-deb12-wine-int_native-cross_aarch64-unknown-mingw32-validate+llvm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2342,7 +2325,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-linux-deb12-wine-int_native-cross_aarch64-unknown-mingw32-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2551,7 +2533,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-linux-deb13-validate+llvm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2613,7 +2594,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-aarch64-linux-deb13-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2739,7 +2719,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-i386-linux-alpine3_23-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2865,7 +2844,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-i386-linux-deb11-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -2990,7 +2968,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-i386-linux-deb12-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -3115,7 +3092,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-i386-linux-deb13-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -3247,7 +3223,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-darwin-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -3381,7 +3356,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-freebsd14-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -3510,7 +3484,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_12-int_native-validate+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -3637,7 +3610,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_12-validate+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -3764,7 +3736,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -3893,7 +3864,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-wasm-cross_wasm32-wasi-release+host_fully_static+text_simdutf.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4024,7 +3994,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-wasm-int_native-cross_wasm32-wasi-release+host_fully_static+text_simdutf.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4155,7 +4124,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-wasm-unreg-cross_wasm32-wasi-release+host_fully_static+text_simdutf.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4286,7 +4254,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4477,7 +4444,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb11-validate+debug_info.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4539,7 +4505,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb11-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4664,7 +4629,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb12-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4792,7 +4756,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-cross_aarch64-linux-gnu-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -4920,7 +4883,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-int_native-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5045,7 +5007,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-no_tntc-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5171,7 +5132,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-numa-slow-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5297,7 +5257,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5359,7 +5318,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5487,7 +5445,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-riscv-cross_riscv64-linux-gnu-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5615,7 +5572,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-unreg-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5803,7 +5759,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate+boot_nonmoving_gc.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -5928,7 +5883,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate+llvm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6055,7 +6009,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate+thread_sanitizer_cmm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6119,7 +6072,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6244,7 +6196,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-zstd-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6433,7 +6384,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6496,7 +6446,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6749,7 +6698,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-validate+debug_info+ubsan.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6813,7 +6761,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-validate+debug_info.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -6875,7 +6822,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7000,7 +6946,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-rocky8-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7125,7 +7070,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-ubuntu22_04-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7253,7 +7197,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-ubuntu24_04-loongarch-cross_loongarch64-linux-gnu-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7381,7 +7324,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-linux-ubuntu24_04-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7505,7 +7447,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-windows-int_native-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7630,7 +7571,6 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
- "ghc-x86_64-windows-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7761,7 +7701,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-aarch64-darwin-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -7892,7 +7831,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-aarch64-linux-alpine3_23-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8020,7 +7958,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-aarch64-linux-deb11-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8147,7 +8084,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-aarch64-linux-deb12-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8274,7 +8210,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-aarch64-linux-deb13-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8402,7 +8337,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-i386-linux-alpine3_23-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8530,7 +8464,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-i386-linux-deb11-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8657,7 +8590,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-i386-linux-deb12-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8784,7 +8716,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-i386-linux-deb13-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -8918,7 +8849,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-darwin-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9054,7 +8984,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-freebsd14-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9185,7 +9114,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-alpine3_12-int_native-release+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9314,7 +9242,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-alpine3_12-release+fully_static+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9443,7 +9370,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-alpine3_23-release+no_split_sections.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9635,7 +9561,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-deb11-release+debug_info.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9698,7 +9623,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-deb11-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9825,7 +9749,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-deb12-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -9952,7 +9875,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-deb13-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10143,7 +10065,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-fedora43-release+debug_info.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10271,7 +10192,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-fedora43-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10335,7 +10255,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-fedora43-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10462,7 +10381,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-rocky8-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10589,7 +10507,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-ubuntu22_04-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10716,7 +10633,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-ubuntu24_04-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10842,7 +10758,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-windows-int_native-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -10969,7 +10884,6 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-windows-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11102,7 +11016,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-darwin-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11234,7 +11147,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-freebsd14-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11361,7 +11273,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_12-int_native-validate+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11486,7 +11397,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_12-validate+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11611,7 +11521,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11738,7 +11647,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-wasm-cross_wasm32-wasi-release+host_fully_static+text_simdutf.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11868,7 +11776,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-wasm-int_native-cross_wasm32-wasi-release+host_fully_static+text_simdutf.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -11999,7 +11906,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-alpine3_23-wasm-unreg-cross_wasm32-wasi-release+host_fully_static+text_simdutf.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -12129,7 +12035,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -12317,7 +12222,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb11-validate+debug_info.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -12378,7 +12282,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb11-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -12501,7 +12404,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb12-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -12627,7 +12529,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-cross_aarch64-linux-gnu-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -12753,7 +12654,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-int_native-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -12877,7 +12777,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-no_tntc-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13002,7 +12901,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-numa-slow-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13126,7 +13024,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13187,7 +13084,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13313,7 +13209,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-riscv-cross_riscv64-linux-gnu-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13439,7 +13334,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-unreg-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13624,7 +13518,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate+boot_nonmoving_gc.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13747,7 +13640,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate+llvm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13873,7 +13765,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate+thread_sanitizer_cmm.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -13937,7 +13828,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14060,7 +13950,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-deb13-zstd-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14246,7 +14135,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14308,7 +14196,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-release.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14557,7 +14444,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-validate+debug_info+ubsan.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14620,7 +14506,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-validate+debug_info.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14681,7 +14566,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-fedora43-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14804,7 +14688,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-rocky8-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -14927,7 +14810,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-ubuntu22_04-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -15053,7 +14935,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-ubuntu24_04-loongarch-cross_loongarch64-linux-gnu-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -15179,7 +15060,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-linux-ubuntu24_04-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -15301,7 +15181,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-windows-int_native-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
@@ -15424,7 +15303,6 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
- "ghc-x86_64-windows-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ff5f5247a4aec3425e64f92db5fe4c2…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ff5f5247a4aec3425e64f92db5fe4c2…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/jeltsch/smaller-pit] 9 commits: Remove bitSize from MINIMAL pragma of class Bits
by Wolfgang Jeltsch (@jeltsch) 05 Oct '26
by Wolfgang Jeltsch (@jeltsch) 05 Oct '26
05 Oct '26
Wolfgang Jeltsch pushed to branch wip/jeltsch/smaller-pit at Glasgow Haskell Compiler / GHC
Commits:
1d2a26ee by Andrew Lelechenko at 2026-10-01T20:22:04-04:00
Remove bitSize from MINIMAL pragma of class Bits
Cf. https://github.com/haskell/core-libraries-committee/issues/441
The function is deprecated for 12 years and has a default implementation,
yet it was never removed from the MINIMAL pragma, putting library authors
in a very awkward position. Let's finally remove bitSize from MINIMAL.
- - - - -
3cc21e4c by Hannes Siebenhandl at 2026-10-01T20:22:59-04:00
Add regression test for #27641
- - - - -
c35096f5 by Hannes Siebenhandl at 2026-10-01T20:23:00-04:00
Don't `:add` modules the loader will reject
Only home modules can be actually added to the loader context, thus we
only accept the module if it belongs to a home unit.
- - - - -
a563cb27 by Simon Jakobi at 2026-10-02T17:37:36-04:00
ci: accept modified changelog.d entries in lint-changelog
The changelog guide says to extend an existing entry rather than add a
new one when the feature is already documented. lint_changelog only
counted added files, so such MRs failed before the validator ran.
Fixes #27779.
Assisted-by: Claude Fable 5.1
- - - - -
03082cd4 by Simon Jakobi at 2026-10-02T17:38:17-04:00
changelog.d: Fix warning flag name in the semaphore-v2 entry
The entry refers to -Wsemaphore-version-mismatch, which does not exist.
The warning GHC emits when it cannot use a -jsem semaphore, including
on a protocol version mismatch, is -Wsemaphore-open-failure.
Context: !15729, #25087
Assisted-by: Claude Fable 5.1
- - - - -
a93705ee by Simon Jakobi at 2026-10-02T17:38:17-04:00
changelog.d: Fix the CLC proposal link in the T27455 entry
The entry used the Sphinx :ref: role with a URL as its target. :ref:
resolves only internal labels, so the generated release notes would
show the proposal name without a link. Use the plain hyperlink form
like the other entries.
Context: !16274, #27455
Assisted-by: Claude Fable 5.1
- - - - -
54381079 by Hannes Siebenhandl at 2026-10-02T17:39:01-04:00
Extend the `TrustOverlay` for wired-in units
The TrustOverlay only contained the `UnitId` of all on-disk units.
However, wired-in units are referred to by their wired-in unit id, which
is not the same as the on-disk unit id.
Thus, trust checks for wired-in units failed because the lookup was
using the wired-in unit, which wasn't present in the `TrustOverlay`.
We fix #27834, by copying the trust info for wired-in unit ids.
- - - - -
d4090fc2 by Wolfgang Jeltsch at 2026-10-05T14:40:15+03:00
Make Haddock avoid the PIT
To this end, Haddock has been using `loadSysInterface` to fetch module
interfaces. The `loadSysInterface` operation is very complex, containing
many bits that do not seem to be needed by Haddock. In particular,
storing interface data in and potentially retrieving it from the PIT
seems to be superfluous. This interaction with the PIT limits how much
we can statically shrink the amount of information that is stored in the
PIT. Therefore, we drop the use of `loadSysInterface` and implement the
necessary bits of interface fetching directly in `loadHiFile`, where
`loadSysInterface` use to be invoked.
- - - - -
6f872530 by Wolfgang Jeltsch at 2026-10-05T14:40:15+03:00
Statically enforce module interface reduction for the PIT
`GHC.Iface.Load.loadInterface` used to replace certain fields of each
fetched module interface by `panic` applications before storing it in
the PIT. With the present change, the absence of those fields in the PIT
is guaranteed statically.
See #27044 for the bigger picture.
- - - - -
42 changed files:
- .gitlab/ci.sh
- + changelog.d/27641
- changelog.d/T27455
- changelog.d/semaphore-v2
- changelog.d/unit-index
- compiler/GHC/Driver/Downsweep.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Main/Interactive.hs
- compiler/GHC/Driver/Main/Passes.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Driver/Session/Inspect.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Load.hs-boot
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Unit/External.hs
- compiler/GHC/Unit/External/Wired.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/GHC/Unit/State.hs
- ghc/GHCi/UI.hs
- ghc/Main.hs
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Bits.hs
- + testsuite/tests/ghci/scripts/T27641.script
- + testsuite/tests/ghci/scripts/T27641.stderr
- + testsuite/tests/ghci/scripts/T27641.stdout
- + testsuite/tests/ghci/scripts/T27834.hs
- + testsuite/tests/ghci/scripts/T27834.script
- + testsuite/tests/ghci/scripts/T27834.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- utils/haddock/haddock-api/src/Haddock/Interface.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3216168c1ebe393788f9c6e735f0d1…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3216168c1ebe393788f9c6e735f0d1…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] ttg: HsModuleName in the AST, ModuleName in GHC
by Marge Bot (@marge-bot) 05 Oct '26
by Marge Bot (@marge-bot) 05 Oct '26
05 Oct '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
d37fd8fd by Rodrigo Mesquita at 2026-10-05T07:20:49-04:00
ttg: HsModuleName in the AST, ModuleName in GHC
This commit makes the AST fully independent from GHC by parsing a
"module name" as an `HsModuleName (= HText)` rather than constructing an
`ModuleName (= FastString)` straight away.
In the GHC side, everything remains as a `ModuleName`. We turn AST
`HsModuleName`s into fast strings with the cheap `mkFastStringShortText`
when we process the AST for manipulation within the compiler.
There are no performance regressions introduced by this approach.
This is the final piece of #21592
Alternative plans were discussed in
gitlab.haskell.org/ghc/ghc/-/merge_requests/16546#note_694647,
but the Simon suggested one won in simplicity and performance when
compared against my attempt at implementing my original plan of having
a family `ModuleNameP`.
- - - - -
90 changed files:
- compiler/GHC.hs
- compiler/GHC/Builtin/Modules.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Show.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Opt/CallerCC/Types.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Main/Compile.hs
- compiler/GHC/Driver/Pipeline.hs-boot
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Pipeline/Phases.hs
- compiler/GHC/Hs/Doc.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Debug.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/String.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Unbound.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Types/ErrCtxt.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Unique.hs
- compiler/GHC/Types/UnresolvedImport.hs
- compiler/GHC/Unit/Home.hs
- compiler/GHC/Unit/Module.hs
- compiler/GHC/Unit/Module/Env.hs
- + compiler/GHC/Unit/Module/Name.hs
- compiler/GHC/Unit/Parser.hs
- compiler/GHC/Unit/Types.hs
- compiler/GHC/Unit/Types.hs-boot
- compiler/GHC/Utils/Binary.hs
- compiler/GHC/Utils/Outputable.hs
- compiler/Language/Haskell/Syntax.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- compiler/Language/Haskell/Syntax/ImpExp.hs
- compiler/Language/Haskell/Syntax/Lit.hs
- compiler/Language/Haskell/Syntax/Module/Name.hs
- compiler/Language/Haskell/Syntax/Text.hs
- compiler/ghc.cabal.in
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Info.hs
- linters/lint-codes/LintCodes/Static.hs
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/ghc-api/downsweep/IncrementalDownsweep.hs
- testsuite/tests/ghc-api/exactprint/T22919.stderr
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr
- testsuite/tests/hiefile/should_run/T24544.hs
- testsuite/tests/module/mod185.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T14189.stderr
- testsuite/tests/parser/should_compile/T15323.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- testsuite/tests/parser/should_compile/T20718.stderr
- testsuite/tests/parser/should_compile/T20718b.stderr
- testsuite/tests/parser/should_compile/T20846.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr
- testsuite/tests/printer/AnnotationNoListTuplePuns.stdout
- testsuite/tests/printer/T18791.stderr
- testsuite/tests/printer/Test20297.stdout
- testsuite/tests/printer/Test24533.stdout
- testsuite/tests/profiling/should_run/caller-cc/CallerCcParser.hs
- utils/check-exact/ExactPrint.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d37fd8fd3d956e04280ef589b973e5d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d37fd8fd3d956e04280ef589b973e5d…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/fendor/27836] Fix #27836, normalise unit database path in ExternalUnitDatabases
by Hannes Siebenhandl (@fendor) 05 Oct '26
by Hannes Siebenhandl (@fendor) 05 Oct '26
05 Oct '26
Hannes Siebenhandl pushed to branch wip/fendor/27836 at Glasgow Haskell Compiler / GHC
Commits:
c6160c09 by Hannes Siebenhandl at 2026-10-05T12:35:39+02:00
Fix #27836, normalise unit database path in ExternalUnitDatabases
Add a regression test, proofing that all variations:
- local-unit-db/my-test.conf
- ./local-unit-db/my-test.conf
- ./local-unit-db/my-test.conf/
are parsed only once.
- - - - -
12 changed files:
- changelog.d/unit-index
- compiler/GHC/Data/OsPath.hs
- compiler/GHC/Unit/External/Database.hs
- + testsuite/tests/driver/T27836/A.hs
- + testsuite/tests/driver/T27836/B.hs
- + testsuite/tests/driver/T27836/C.hs
- + testsuite/tests/driver/T27836/Makefile
- + testsuite/tests/driver/T27836/T27836.stdout
- + testsuite/tests/driver/T27836/all.T
- + testsuite/tests/driver/T27836/unitA
- + testsuite/tests/driver/T27836/unitB
- + testsuite/tests/driver/T27836/unitC
Changes:
=====================================
changelog.d/unit-index
=====================================
@@ -1,7 +1,7 @@
section: compiler
synopsis: Use global ``UnitIndex`` to deduplicate ``UnitInfo``s over multiple home units
-issues: #27500 #26423 #27748 #27834
-mrs: !16115 !16598 !16743
+issues: #27500 #26423 #27748 #27834 #27836
+mrs: !16115 !16598 !16743 !16729
description: {
The ``UnitState`` used to be duplicated for all ``HomeUnitEnv``, not sharing any of the ``UnitInfo``s.
=====================================
compiler/GHC/Data/OsPath.hs
=====================================
@@ -13,6 +13,7 @@ module GHC.Data.OsPath
, (<.>)
, splitSearchPath
, isRelative
+ , normalise
, dropTrailingPathSeparator
, takeDirectory
, isSuffixOf
=====================================
compiler/GHC/Unit/External/Database.hs
=====================================
@@ -53,9 +53,17 @@ import System.FilePath as FilePath
-- ExternalUnitDatabases
-- ----------------------------------------------------------------------------
+-- | A normalised 'OsPath' that we use as the key to cache 'UnitDatabase's.
+--
+-- Removes trailing path separators and unit database paths starting with @./@.
+newtype NormalisedUnitDbLoc = NormalisedUnitDbLoc OsPath
+ deriving (Eq, Ord)
+
-- | Caches unit databases in-memory.
data ExternalUnitDatabases unit = ExternalUnitDatabases
- { eud_cachedDatabases :: !(Map OsPath (UnitDatabase unit))
+ { eud_cachedDatabases :: !(Map NormalisedUnitDbLoc (UnitDatabase unit))
+ -- ^ The 'Map' is keyed by a normalised 'OsPath', ensuring that 'lookupExternalUnitDatabases'
+ -- will never get confused by a stray @./@ or trailing @/@.
}
emptyExternalUnitDatabases :: ExternalUnitDatabases unit
@@ -67,18 +75,20 @@ emptyExternalUnitDatabases =
insertExternalUnitDatabases :: UnitDatabase unit -> ExternalUnitDatabases unit -> ExternalUnitDatabases unit
insertExternalUnitDatabases unit_db eud =
ExternalUnitDatabases
- { eud_cachedDatabases = Map.insert (unitDatabasePath unit_db) unit_db (eud_cachedDatabases eud)
+ { eud_cachedDatabases =
+ Map.insert (normalisedUnitDatabaseKey unit_db) unit_db (eud_cachedDatabases eud)
}
deleteExternalUnitDatabases :: OsPath -> ExternalUnitDatabases unit -> ExternalUnitDatabases unit
deleteExternalUnitDatabases unit_db_path eud =
ExternalUnitDatabases
- { eud_cachedDatabases = Map.delete unit_db_path (eud_cachedDatabases eud)
+ { eud_cachedDatabases =
+ Map.delete (normalisedUnitDatabaseKeyOsPath unit_db_path) (eud_cachedDatabases eud)
}
lookupExternalUnitDatabases :: OsPath -> ExternalUnitDatabases unit -> Maybe (UnitDatabase unit)
lookupExternalUnitDatabases key eud =
- Map.lookup key (eud_cachedDatabases eud)
+ Map.lookup (normalisedUnitDatabaseKeyOsPath key) (eud_cachedDatabases eud)
-- ----------------------------------------------------------------------------
-- UnitDatabase
@@ -87,12 +97,38 @@ lookupExternalUnitDatabases key eud =
-- | Unit database entry.
data UnitDatabase unit = UnitDatabase
{ unitDatabasePath :: OsPath
+ -- ^ On-disk location of the unit database.
+ --
, unitDatabaseUnits :: [GenUnitInfo unit]
+ -- ^ Units read from the database located at 'unitDatabasePath'.
+ --
+ -- These units have the @$pkgroot@ variable already resolved.
}
instance (Outputable u) => Outputable (UnitDatabase u) where
ppr (UnitDatabase fp _u) = text "DB:" <+> ppr fp
+normalisedUnitDatabaseKey :: UnitDatabase unit -> NormalisedUnitDbLoc
+normalisedUnitDatabaseKey unit_db = normalisedUnitDatabaseKeyOsPath $ unitDatabasePath unit_db
+
+-- | Normalise the unit database location and drop trailing path separators.
+--
+-- This ensures that two databases that point to the same location can be cached.
+--
+-- We need to remove trailing slash from the 'OsPath' before calculating @$pkgroot@ (Fix #16360)
+normalisedUnitDatabaseKeyOsPath :: OsPath -> NormalisedUnitDbLoc
+normalisedUnitDatabaseKeyOsPath db_path =
+ NormalisedUnitDbLoc $ OsPath.dropTrailingPathSeparator $ OsPath.normalise db_path
+
+-- | Get the root location of a unit database.
+-- Used to replace @$pkgroot@ variables in the 'GenericUnitInfo'.
+unitDatabaseRoot :: OsPath -> OsPath
+unitDatabaseRoot p =
+ let
+ NormalisedUnitDbLoc np = normalisedUnitDatabaseKeyOsPath p
+ in
+ OsPath.takeDirectory np
+
-- ----------------------------------------------------------------------------
--
-- Merging databases
@@ -258,14 +294,12 @@ readUnitDatabase logger cfg conf_file = do
"can't find a package database at " ++ show conf_file
let
- -- Fix #16360: remove trailing slash from conf_file before calculating pkgroot
- conf_file' = OsPath.dropTrailingPathSeparator conf_file
top_dir = OsPath.unsafeEncodeUtf (unitDbConfigGHCDir cfg)
- pkgroot = OsPath.takeDirectory conf_file'
+ pkgroot = unitDatabaseRoot conf_file
pkg_configs1 = map (mungeUnitInfo top_dir pkgroot . mapUnitInfo (\(UnitKey x) -> UnitId x) . mkUnitKeyInfo)
proto_pkg_configs
--
- return $ UnitDatabase conf_file' pkg_configs1
+ return $ UnitDatabase conf_file pkg_configs1
where
readDirStyleUnitInfo :: OsPath -> IO [DbUnitInfo]
readDirStyleUnitInfo conf_dir = do
=====================================
testsuite/tests/driver/T27836/A.hs
=====================================
@@ -0,0 +1,4 @@
+module A where
+
+a :: Int
+a = 1
=====================================
testsuite/tests/driver/T27836/B.hs
=====================================
@@ -0,0 +1,4 @@
+module B where
+
+b :: Int
+b = 1
=====================================
testsuite/tests/driver/T27836/C.hs
=====================================
@@ -0,0 +1,4 @@
+module C where
+
+b :: Int
+b = 1
=====================================
testsuite/tests/driver/T27836/Makefile
=====================================
@@ -0,0 +1,21 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+T27836:
+ mkdir local-unit-db/
+ cd local-unit-db/ && '$(GHC_PKG)' init my-test.conf
+ # All these unit database paths should resolve to the same location
+ # thus after the first time parsing the unit database, we shouldn't parse it again.
+ '$(TEST_HC)' $(TEST_HC_OPTS) --make \
+ -unit @unitA -unit @unitB -unit @unitC \
+ -v2 -fforce-recomp 2>&1 \
+ | grep 'Using binary package database:'
+
+ echo ""
+ echo ""
+ echo "All -package-db variations:"
+ echo "- local-unit-db/my-test.conf"
+ echo "- ./local-unit-db/my-test.conf"
+ echo "- ./local-unit-db/my-test.conf/"
+ echo "Must be parsed only once."
=====================================
testsuite/tests/driver/T27836/T27836.stdout
=====================================
@@ -0,0 +1,8 @@
+Using binary package database: local-unit-db/my-test.conf/package.cache
+
+
+All -package-db variations:
+- local-unit-db/my-test.conf
+- ./local-unit-db/my-test.conf
+- ./local-unit-db/my-test.conf/
+Must be parsed only once.
=====================================
testsuite/tests/driver/T27836/all.T
=====================================
@@ -0,0 +1,4 @@
+test('T27836',
+ [ extra_files(['A.hs', 'B.hs', 'C.hs', 'unitA', 'unitB', 'unitC']), normalise_slashes
+ ],
+ makefile_test, ['T27836'])
=====================================
testsuite/tests/driver/T27836/unitA
=====================================
@@ -0,0 +1 @@
+-hide-all-packages -no-user-package-db -package-db local-unit-db/my-test.conf -package base -this-unit-id a-0.0.0 A
=====================================
testsuite/tests/driver/T27836/unitB
=====================================
@@ -0,0 +1 @@
+-hide-all-packages -no-user-package-db -package-db ./local-unit-db/my-test.conf -package base -this-unit-id b-0.0.0 B
=====================================
testsuite/tests/driver/T27836/unitC
=====================================
@@ -0,0 +1 @@
+-hide-all-packages -no-user-package-db -package-db ./local-unit-db/my-test.conf/ -package base -this-unit-id c-0.0.0 C
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c6160c09956da0a472af5f531933618…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c6160c09956da0a472af5f531933618…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/fendor/27836] 27 commits: Remove the call to hoistFlag from processCmdLineP
by Hannes Siebenhandl (@fendor) 05 Oct '26
by Hannes Siebenhandl (@fendor) 05 Oct '26
05 Oct '26
Hannes Siebenhandl pushed to branch wip/fendor/27836 at Glasgow Haskell Compiler / GHC
Commits:
098bba70 by Facundo Domínguez at 2026-09-17T14:57:41-04:00
Remove the call to hoistFlag from processCmdLineP
This call was undesirable because it was causing a reconstruction
of the list of flag processors.
Even relying on list fusion would not be sufficient because we want
to replace the list with a data structure with faster lookups to
address #25763.
The removal is done in two moves:
* We move CmdLineP to CmdLine.hs
* Then we move the effect of hoisting to processArgs via a new function
hoistEwM
- - - - -
e01799c7 by Facundo Domínguez at 2026-09-17T14:57:42-04:00
Do not create duplicate flag processors for the -W flag
This makes simpler implementing the command line parser with a trie map
holding flag processors. If we were to allow duplicate flag processors
for any flag, the trie map would need to be a multimap.
- - - - -
3875b257 by Facundo Domínguez at 2026-09-17T14:57:42-04:00
Replace the list of flag processors with a trie map in `processArgs`
Previously `GHC.Driver.CmdLine.findArg` was called for each
command-line argument, doing a linear search on the list of flag
processors each time. This was somewhat costly as the list of flag
processor has near 2000 elements.
A lookup with a trie map is faster in general, but the speed up is
only noticeable when calling `GHC.Driver.CmdLine.processArgs` sufficient
times, so the amount of lookups piles up. This could happen in large
projects with many units each having many dependencies. If only a
module needs to be recompiled, the user still needs to wait for all of
the flag parsing to complete.
The benchmark at testsuite/tests/perf/compiler/cmdline-parser shows a
10x speed up when using the trie.
The trie map is implemented in `GHC.Data.StringTrie`.
The design is explained in Note [Processing command line argument fast]
in GHC.Driver.Session.
The commit also:
* adds two property-based tests for trie map operations,
* adds a benchmark of the command line parser, and
* renames the predicate `arg_ok` to `valid_flag_suffix` to decide what
flag processor should be used when there are multiple matching
prefixes on a flag.
Fixes #25763.
- - - - -
5236634a by Andreas Klebinger at 2026-09-17T14:58:24-04:00
Compile Word64{Map,Set} with -O2 always.
This is the hottest code and even if we build GHC with -O0 otherwise -O2
pays off for these modules.
Fixes #27814.
- - - - -
545fd4fb by ARATA Mizuki at 2026-09-22T15:03:24-04:00
Change the C types of hs_{bitrev,bswap}{16,32} to match the Haskell types
bitReverse{16,32}# and byteSwap{16,32}# have the type
Word# -> Word#, but their C correspondents took and
returned StgWord{16,32}.
The mismatch on bitReverse16# led to the problem reported
in #27299. Although no similar issue is reported for
bitReverse32# and byteSwap{16,32}#, it seemed wise to
change them proactively.
This commit fixes the mismatch by changing the C type.
Fixes #27299
- - - - -
bf17f289 by fendor at 2026-09-22T15:04:05-04:00
Don't lose instances from shadowed imported modules with the same name
When we look for instances below the current module, we need to check
the unit id as well when we check for whether the module is the current
module, otherwise we ignore modules we import that have the same name as
the import module.
Adds regression test.
- - - - -
53eead15 by Wolfgang Jeltsch at 2026-09-24T20:12:03-04:00
Correct the documentation of `explicitUnits`
Resolves #27787.
- - - - -
35bf6f4b by Simon Jakobi at 2026-09-24T20:12:49-04:00
Remove stale specHeader bullet from Note [Don't make fillers for constraint types]
The Note said that Specialise.specHeader also calls mkAbsentFiller.
abfc224a27c removed that call: the specialiser no longer drops dead
arguments at all, see Note [Do not drop dead args from specialisations]
in GHC.Core.Opt.Specialise.
Assisted-by: Claude Fable 5.1
- - - - -
1abef1ef by Wolfgang Jeltsch at 2026-09-25T17:02:07-04:00
Improve the `mhu-closure` makefile
- - - - -
a79a68ea by Wolfgang Jeltsch at 2026-09-25T17:02:07-04:00
Make `ghci-multi` hide all unneeded packages
- - - - -
d6e72450 by Wolfgang Jeltsch at 2026-09-25T17:02:07-04:00
Improve the definition of the home unit closure property
- - - - -
c9a2766d by Wolfgang Jeltsch at 2026-09-25T17:02:07-04:00
Re-implement the home unit closure check
Compared to the previous implementation, the new one has the following
advantages:
* It is correct.
- It distinguishes between units that have the same unit ID but
different ABI hashes.
- When `-hide-all-packages` is not used, it considers as home unit
dependencies also units that are made implicitly available
because they are in the package database.
* It seems to be faster in usual settings.
- In particular, it does not have a preparation phase in which it
merges the dependency information from all home units, so that
its running time does not grow linearly with the size of the
package database in normal Cabal scenarios.
* It is (hopefully) clearer.
* It is better documented.
- - - - -
fa96acf8 by Wolfgang Jeltsch at 2026-09-25T17:02:07-04:00
Remove erroneous GHC flag in `hadrian-multi`
The flag was `-Werror=-Wno-error=incomplete-record-selectors`. Its
purpose was to permit incomplete record selectors, but because of the
illegal combination of `-Werror=` and `-Wno-error` it was ignored,
without any negative consequences.
- - - - -
9f48a5b9 by Alan Zimmerman at 2026-09-25T17:02:50-04:00
EPA: Add specific layout field to AnnList
Up to now AnnList has effectively served to represent lists of things
having layout, regardless of whether they do or not.
In Haskell, layout is optional in many places, as there is also an
alternative syntax using braces and semi-colons, which is free-form.
This commit introduces AnnListLayout, a data structure capturing this
distinction.
It is deliberately set up similarly to EpLayout, so that these two can
be merged in time.
The transition is done mechanically, where AnnListBraces is not used
yet, the original Nothing case maps to AnnListNoLayout, and the Just
case to AnnListLayout.
Later commits will fine tune these against the actual parser layout.
- - - - -
234bab08 by Vladislav Zavialov at 2026-09-29T17:22:54-04:00
Add regression test for #7803
Commit 2effe18ab5, first shipped with GHC 8.2.1, fixed #7803 "Superclass
methods are left unspecialized".
This change turns the example from the ticket description into a regression
test, checking that foo1 is fully specialised at Double, with no calls to the
overloaded exp5Tail.
Closes #7803
Assisted-by: Claude Opus 5
- - - - -
c406135c by Andreas Klebinger at 2026-10-01T06:57:28-04:00
RTS: Update flag parsing/handling:
Using 0 as argument to any of these flags now resets the flags setting to default:
- ``-n0`` disables nursery chunking.
- ``-K0`` (or a bare ``-K``) removes the stack size limit.
- ``-M0`` removes the heap size limit.
- ``-H0`` resets the suggested heap size, including the nursery scaling set by ``-H``.
- ``-AL0`` makes the large object allocation limit follow ``-A`` again.
GC Generations are now limited to 64.
-n larger than -A now emits a warning and disables chunking.
Fixes #27830 #27829
- - - - -
984ee82b by Andreas Klebinger at 2026-10-01T06:58:10-04:00
Fix MultiLayerModules timeout multiplier.
We accidentally used the compile multiplier for ghci commands which
use the run timeout setting to set the timeout.
Fixes #26263 and #27796.
- - - - -
50a9cf26 by Andreas Klebinger at 2026-10-01T06:58:10-04:00
testsuite: Include runtime in JUnit report.
- - - - -
e358619f by Alan Zimmerman at 2026-10-01T06:59:01-04:00
EPA: Use EpaLocation in EpVirtualBraces
Haddock processing uses EpLayout.EpVirtualBraces to record the current
layout column, for allocating haddock comments correctly.
For exact printing, we need the line as well as the col, so we know
how many lines to skip when the indented code block starts.
This commit updates EpLayout.EpVirtualBraces so that it carries an
EpaLocation instead of just the Int column, to allow it to be used for
both purposes.
It is a simple mechanical change, with no other impact, but it allows
us to use EpLayout instead of AnnListLayout in AnnList, in the next
commit in this series.
- - - - -
1d2a26ee by Andrew Lelechenko at 2026-10-01T20:22:04-04:00
Remove bitSize from MINIMAL pragma of class Bits
Cf. https://github.com/haskell/core-libraries-committee/issues/441
The function is deprecated for 12 years and has a default implementation,
yet it was never removed from the MINIMAL pragma, putting library authors
in a very awkward position. Let's finally remove bitSize from MINIMAL.
- - - - -
3cc21e4c by Hannes Siebenhandl at 2026-10-01T20:22:59-04:00
Add regression test for #27641
- - - - -
c35096f5 by Hannes Siebenhandl at 2026-10-01T20:23:00-04:00
Don't `:add` modules the loader will reject
Only home modules can be actually added to the loader context, thus we
only accept the module if it belongs to a home unit.
- - - - -
a563cb27 by Simon Jakobi at 2026-10-02T17:37:36-04:00
ci: accept modified changelog.d entries in lint-changelog
The changelog guide says to extend an existing entry rather than add a
new one when the feature is already documented. lint_changelog only
counted added files, so such MRs failed before the validator ran.
Fixes #27779.
Assisted-by: Claude Fable 5.1
- - - - -
03082cd4 by Simon Jakobi at 2026-10-02T17:38:17-04:00
changelog.d: Fix warning flag name in the semaphore-v2 entry
The entry refers to -Wsemaphore-version-mismatch, which does not exist.
The warning GHC emits when it cannot use a -jsem semaphore, including
on a protocol version mismatch, is -Wsemaphore-open-failure.
Context: !15729, #25087
Assisted-by: Claude Fable 5.1
- - - - -
a93705ee by Simon Jakobi at 2026-10-02T17:38:17-04:00
changelog.d: Fix the CLC proposal link in the T27455 entry
The entry used the Sphinx :ref: role with a URL as its target. :ref:
resolves only internal labels, so the generated release notes would
show the proposal name without a link. Use the plain hyperlink form
like the other entries.
Context: !16274, #27455
Assisted-by: Claude Fable 5.1
- - - - -
54381079 by Hannes Siebenhandl at 2026-10-02T17:39:01-04:00
Extend the `TrustOverlay` for wired-in units
The TrustOverlay only contained the `UnitId` of all on-disk units.
However, wired-in units are referred to by their wired-in unit id, which
is not the same as the on-disk unit id.
Thus, trust checks for wired-in units failed because the lookup was
using the wired-in unit, which wasn't present in the `TrustOverlay`.
We fix #27834, by copying the trust info for wired-in unit ids.
- - - - -
a47c6c8c by Hannes Siebenhandl at 2026-10-05T10:57:10+02:00
Fix #27836, normalise unit database path in ExternalUnitDatabases
Add a regression test, proofing that all variations:
- local-unit-db/my-test.conf
- ./local-unit-db/my-test.conf
- ./local-unit-db/my-test.conf/
are parsed only once.
- - - - -
121 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- + changelog.d/25763-cmdline-opt
- + changelog.d/26610
- + changelog.d/27641
- changelog.d/T27455
- + changelog.d/T27830-rts-flag-bounds
- changelog.d/semaphore-v2
- changelog.d/unit-index
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Data/OsPath.hs
- + compiler/GHC/Data/StringTrie.hs
- compiler/GHC/Data/Word64Map/Internal.hs
- compiler/GHC/Data/Word64Map/Strict/Internal.hs
- compiler/GHC/Data/Word64Set/Internal.hs
- compiler/GHC/Driver/CmdLine.hs
- compiler/GHC/Driver/Downsweep.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Unit/Env.hs
- compiler/GHC/Unit/External/Database.hs
- compiler/GHC/Unit/External/Wired.hs
- compiler/GHC/Unit/State.hs
- compiler/ghc.cabal.in
- docs/users_guide/runtime_control.rst
- ghc/GHC/Driver/Session/Mode.hs
- ghc/GHCi/UI.hs
- hadrian/ghci-multi-cabal.in
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Bits.hs
- rts/RtsFlags.c
- rts/include/rts/Flags.h
- rts/include/rts/storage/GC.h
- rts/include/stg/Prim.h
- rts/prim/bitrev.c
- rts/prim/bswap.c
- rts/sm/GC.c
- rts/sm/Storage.c
- testsuite/driver/junit.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/MiniQuickCheck.hs
- + testsuite/tests/driver/T27836/A.hs
- + testsuite/tests/driver/T27836/B.hs
- + testsuite/tests/driver/T27836/C.hs
- + testsuite/tests/driver/T27836/Makefile
- + testsuite/tests/driver/T27836/T27836.stdout
- + testsuite/tests/driver/T27836/all.T
- + testsuite/tests/driver/T27836/unitA
- + testsuite/tests/driver/T27836/unitB
- + testsuite/tests/driver/T27836/unitC
- testsuite/tests/driver/all.T
- testsuite/tests/driver/multipleHomeUnits/mhu-closure/Makefile
- testsuite/tests/driver/multipleHomeUnits/mhu-closure/mhu-closure.stderr
- testsuite/tests/driver/multipleHomeUnits/mhu-closure/mhu-closure.stdout
- + testsuite/tests/driver/stringtrie.hs
- + testsuite/tests/driver/stringtrie.stdout
- testsuite/tests/ghc-api/exactprint/T22919.stderr
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
- + testsuite/tests/ghci/prog-mhu008/Makefile
- + testsuite/tests/ghci/prog-mhu008/a/M.hs
- + testsuite/tests/ghci/prog-mhu008/all.T
- + testsuite/tests/ghci/prog-mhu008/b/M.hs
- + testsuite/tests/ghci/prog-mhu008/prog-mhu008.script
- + testsuite/tests/ghci/prog-mhu008/prog-mhu008.stdout
- + testsuite/tests/ghci/prog-mhu008/unitA
- + testsuite/tests/ghci/prog-mhu008/unitB
- + testsuite/tests/ghci/scripts/T27641.script
- + testsuite/tests/ghci/scripts/T27641.stderr
- + testsuite/tests/ghci/scripts/T27641.stdout
- + testsuite/tests/ghci/scripts/T27834.hs
- + testsuite/tests/ghci/scripts/T27834.script
- + testsuite/tests/ghci/scripts/T27834.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/module/mod185.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T15279.stderr
- testsuite/tests/parser/should_compile/T15323.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- testsuite/tests/parser/should_compile/T20718.stderr
- testsuite/tests/parser/should_compile/T20718b.stderr
- testsuite/tests/parser/should_compile/T20846.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr
- + testsuite/tests/perf/compiler/T25763.stderr
- testsuite/tests/perf/compiler/all.T
- + testsuite/tests/primops/should_run/T27299.hs
- + testsuite/tests/primops/should_run/T27299.stdout
- testsuite/tests/primops/should_run/all.T
- testsuite/tests/printer/AnnotationNoListTuplePuns.stdout
- testsuite/tests/printer/T18791.stderr
- testsuite/tests/printer/Test20297.stdout
- testsuite/tests/printer/Test24533.stdout
- testsuite/tests/rts/all.T
- testsuite/tests/rts/rtsflags001.stderr-ws-32
- testsuite/tests/rts/rtsflags001.stderr-ws-64
- + testsuite/tests/simplCore/should_compile/T7803.hs
- + testsuite/tests/simplCore/should_compile/T7803.stderr
- + testsuite/tests/simplCore/should_compile/T7803a.hs
- testsuite/tests/simplCore/should_compile/all.T
- + testsuite/tests/warnings/should_fail/WExpectedNoArgError.stderr
- testsuite/tests/warnings/should_fail/all.T
- utils/check-exact/ExactPrint.hs
- utils/check-exact/Main.hs
- utils/check-exact/Transform.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/671c3b88e43df1fe1c6ae21809f627…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/671c3b88e43df1fe1c6ae21809f627…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/fendor/27835] 13 commits: Add regression test for #7803
by Hannes Siebenhandl (@fendor) 05 Oct '26
by Hannes Siebenhandl (@fendor) 05 Oct '26
05 Oct '26
Hannes Siebenhandl pushed to branch wip/fendor/27835 at Glasgow Haskell Compiler / GHC
Commits:
234bab08 by Vladislav Zavialov at 2026-09-29T17:22:54-04:00
Add regression test for #7803
Commit 2effe18ab5, first shipped with GHC 8.2.1, fixed #7803 "Superclass
methods are left unspecialized".
This change turns the example from the ticket description into a regression
test, checking that foo1 is fully specialised at Double, with no calls to the
overloaded exp5Tail.
Closes #7803
Assisted-by: Claude Opus 5
- - - - -
c406135c by Andreas Klebinger at 2026-10-01T06:57:28-04:00
RTS: Update flag parsing/handling:
Using 0 as argument to any of these flags now resets the flags setting to default:
- ``-n0`` disables nursery chunking.
- ``-K0`` (or a bare ``-K``) removes the stack size limit.
- ``-M0`` removes the heap size limit.
- ``-H0`` resets the suggested heap size, including the nursery scaling set by ``-H``.
- ``-AL0`` makes the large object allocation limit follow ``-A`` again.
GC Generations are now limited to 64.
-n larger than -A now emits a warning and disables chunking.
Fixes #27830 #27829
- - - - -
984ee82b by Andreas Klebinger at 2026-10-01T06:58:10-04:00
Fix MultiLayerModules timeout multiplier.
We accidentally used the compile multiplier for ghci commands which
use the run timeout setting to set the timeout.
Fixes #26263 and #27796.
- - - - -
50a9cf26 by Andreas Klebinger at 2026-10-01T06:58:10-04:00
testsuite: Include runtime in JUnit report.
- - - - -
e358619f by Alan Zimmerman at 2026-10-01T06:59:01-04:00
EPA: Use EpaLocation in EpVirtualBraces
Haddock processing uses EpLayout.EpVirtualBraces to record the current
layout column, for allocating haddock comments correctly.
For exact printing, we need the line as well as the col, so we know
how many lines to skip when the indented code block starts.
This commit updates EpLayout.EpVirtualBraces so that it carries an
EpaLocation instead of just the Int column, to allow it to be used for
both purposes.
It is a simple mechanical change, with no other impact, but it allows
us to use EpLayout instead of AnnListLayout in AnnList, in the next
commit in this series.
- - - - -
1d2a26ee by Andrew Lelechenko at 2026-10-01T20:22:04-04:00
Remove bitSize from MINIMAL pragma of class Bits
Cf. https://github.com/haskell/core-libraries-committee/issues/441
The function is deprecated for 12 years and has a default implementation,
yet it was never removed from the MINIMAL pragma, putting library authors
in a very awkward position. Let's finally remove bitSize from MINIMAL.
- - - - -
3cc21e4c by Hannes Siebenhandl at 2026-10-01T20:22:59-04:00
Add regression test for #27641
- - - - -
c35096f5 by Hannes Siebenhandl at 2026-10-01T20:23:00-04:00
Don't `:add` modules the loader will reject
Only home modules can be actually added to the loader context, thus we
only accept the module if it belongs to a home unit.
- - - - -
a563cb27 by Simon Jakobi at 2026-10-02T17:37:36-04:00
ci: accept modified changelog.d entries in lint-changelog
The changelog guide says to extend an existing entry rather than add a
new one when the feature is already documented. lint_changelog only
counted added files, so such MRs failed before the validator ran.
Fixes #27779.
Assisted-by: Claude Fable 5.1
- - - - -
03082cd4 by Simon Jakobi at 2026-10-02T17:38:17-04:00
changelog.d: Fix warning flag name in the semaphore-v2 entry
The entry refers to -Wsemaphore-version-mismatch, which does not exist.
The warning GHC emits when it cannot use a -jsem semaphore, including
on a protocol version mismatch, is -Wsemaphore-open-failure.
Context: !15729, #25087
Assisted-by: Claude Fable 5.1
- - - - -
a93705ee by Simon Jakobi at 2026-10-02T17:38:17-04:00
changelog.d: Fix the CLC proposal link in the T27455 entry
The entry used the Sphinx :ref: role with a URL as its target. :ref:
resolves only internal labels, so the generated release notes would
show the proposal name without a link. Use the plain hyperlink form
like the other entries.
Context: !16274, #27455
Assisted-by: Claude Fable 5.1
- - - - -
54381079 by Hannes Siebenhandl at 2026-10-02T17:39:01-04:00
Extend the `TrustOverlay` for wired-in units
The TrustOverlay only contained the `UnitId` of all on-disk units.
However, wired-in units are referred to by their wired-in unit id, which
is not the same as the on-disk unit id.
Thus, trust checks for wired-in units failed because the lookup was
using the wired-in unit, which wasn't present in the `TrustOverlay`.
We fix #27834, by copying the trust info for wired-in unit ids.
- - - - -
ef692859 by Hannes Siebenhandl at 2026-10-05T10:55:39+02:00
Prepend in-memory unit database for backpack
The packageDbFlags are stored in reverse order. Thus, prepending will
ensure that the in-memory unit database is the last item on the unit
database stack.
Further, the in-memory unit database needs to be able to shadow units
from earlier unit databases in the unit database stack.
Moreover, a `-clear-package-db` would remove the in-memory database if
it weren't the last item on the stack.
Closes #27835
- - - - -
66 changed files:
- .gitlab/ci.sh
- + changelog.d/27641
- changelog.d/T27455
- + changelog.d/T27830-rts-flag-bounds
- changelog.d/semaphore-v2
- changelog.d/unit-index
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Unit/External/Wired.hs
- compiler/GHC/Unit/State.hs
- docs/users_guide/runtime_control.rst
- ghc/GHCi/UI.hs
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Bits.hs
- rts/RtsFlags.c
- rts/include/rts/Flags.h
- rts/include/rts/storage/GC.h
- rts/sm/GC.c
- rts/sm/Storage.c
- testsuite/driver/junit.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- + testsuite/tests/backpack/should_compile/T27835.bkp
- + testsuite/tests/backpack/should_compile/T27835.stderr
- testsuite/tests/backpack/should_compile/all.T
- testsuite/tests/ghc-api/exactprint/T22919.stderr
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
- + testsuite/tests/ghci/scripts/T27641.script
- + testsuite/tests/ghci/scripts/T27641.stderr
- + testsuite/tests/ghci/scripts/T27641.stdout
- + testsuite/tests/ghci/scripts/T27834.hs
- + testsuite/tests/ghci/scripts/T27834.script
- + testsuite/tests/ghci/scripts/T27834.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/module/mod185.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T15323.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- testsuite/tests/parser/should_compile/T20718.stderr
- testsuite/tests/parser/should_compile/T20718b.stderr
- testsuite/tests/parser/should_compile/T20846.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/printer/AnnotationNoListTuplePuns.stdout
- testsuite/tests/printer/T18791.stderr
- testsuite/tests/printer/Test20297.stdout
- testsuite/tests/printer/Test24533.stdout
- testsuite/tests/rts/all.T
- testsuite/tests/rts/rtsflags001.stderr-ws-32
- testsuite/tests/rts/rtsflags001.stderr-ws-64
- + testsuite/tests/simplCore/should_compile/T7803.hs
- + testsuite/tests/simplCore/should_compile/T7803.stderr
- + testsuite/tests/simplCore/should_compile/T7803a.hs
- testsuite/tests/simplCore/should_compile/all.T
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5305cbc104bbb820badda5b9d2653f…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5305cbc104bbb820badda5b9d2653f…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: [CLC 341] Strict variants of mutable types
by Marge Bot (@marge-bot) 05 Oct '26
by Marge Bot (@marge-bot) 05 Oct '26
05 Oct '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
f8cfb1a5 by Hécate Kleidukos at 2026-10-04T19:36:39+02:00
[CLC 341] Strict variants of mutable types
This commit is the implementation of CLC Proposal 341
https://github.com/haskell/core-libraries-committee/issues/341
- - - - -
485dea82 by Rodrigo Mesquita at 2026-10-05T03:32:22-04:00
ttg: HsModuleName in the AST, ModuleName in GHC
This commit makes the AST fully independent from GHC by parsing a
"module name" as an `HsModuleName (= HText)` rather than constructing an
`ModuleName (= FastString)` straight away.
In the GHC side, everything remains as a `ModuleName`. We turn AST
`HsModuleName`s into fast strings with the cheap `mkFastStringShortText`
when we process the AST for manipulation within the compiler.
There are no performance regressions introduced by this approach.
This is the final piece of #21592
Alternative plans were discussed in
gitlab.haskell.org/ghc/ghc/-/merge_requests/16546#note_694647,
but the Simon suggested one won in simplicity and performance when
compared against my attempt at implementing my original plan of having
a family `ModuleNameP`.
- - - - -
102 changed files:
- + changelog.d/clc-341-strict-mutable-data-types
- compiler/GHC.hs
- compiler/GHC/Builtin/Modules.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Show.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Opt/CallerCC/Types.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Main/Compile.hs
- compiler/GHC/Driver/Pipeline.hs-boot
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Pipeline/Phases.hs
- compiler/GHC/Hs/Doc.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Lit.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Debug.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/String.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Unbound.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Types/ErrCtxt.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Unique.hs
- compiler/GHC/Types/UnresolvedImport.hs
- compiler/GHC/Unit/Home.hs
- compiler/GHC/Unit/Module.hs
- compiler/GHC/Unit/Module/Env.hs
- + compiler/GHC/Unit/Module/Name.hs
- compiler/GHC/Unit/Parser.hs
- compiler/GHC/Unit/Types.hs
- compiler/GHC/Unit/Types.hs-boot
- compiler/GHC/Utils/Binary.hs
- compiler/GHC/Utils/Outputable.hs
- compiler/Language/Haskell/Syntax.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- compiler/Language/Haskell/Syntax/ImpExp.hs
- compiler/Language/Haskell/Syntax/Lit.hs
- compiler/Language/Haskell/Syntax/Module/Name.hs
- compiler/Language/Haskell/Syntax/Text.hs
- compiler/ghc.cabal.in
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Info.hs
- libraries/base/base.cabal.in
- libraries/base/changelog.md
- libraries/base/src/Control/Concurrent/Chan.hs
- + libraries/base/src/Control/Concurrent/Chan/Strict.hs
- libraries/base/src/Control/Concurrent/MVar.hs
- + libraries/base/src/Control/Concurrent/MVar/Strict.hs
- libraries/base/src/Data/IORef.hs
- + libraries/base/src/Data/IORef/Strict.hs
- linters/lint-codes/LintCodes/Static.hs
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/ghc-api/downsweep/IncrementalDownsweep.hs
- testsuite/tests/ghc-api/exactprint/T22919.stderr
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr
- testsuite/tests/hiefile/should_run/T24544.hs
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/module/mod185.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T14189.stderr
- testsuite/tests/parser/should_compile/T15323.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- testsuite/tests/parser/should_compile/T20718.stderr
- testsuite/tests/parser/should_compile/T20718b.stderr
- testsuite/tests/parser/should_compile/T20846.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr
- testsuite/tests/printer/AnnotationNoListTuplePuns.stdout
- testsuite/tests/printer/T18791.stderr
- testsuite/tests/printer/Test20297.stdout
- testsuite/tests/printer/Test24533.stdout
- testsuite/tests/profiling/should_run/caller-cc/CallerCcParser.hs
- utils/check-exact/ExactPrint.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c5685ea96dc2e2a44ffb3a110c9c0…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c5685ea96dc2e2a44ffb3a110c9c0…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/sjakobi/T27368-cbe-expand-subst] Cmm: keep the CBE substitution idempotent
by Simon Jakobi (@sjakobi) 05 Oct '26
by Simon Jakobi (@sjakobi) 05 Oct '26
05 Oct '26
Simon Jakobi pushed to branch wip/sjakobi/T27368-cbe-expand-subst at Glasgow Haskell Compiler / GHC
Commits:
64604b2c by Simon Jakobi at 2026-10-05T09:14:06+02:00
Cmm: keep the CBE substitution idempotent
When blocks are merged over multiple rounds during common block
elimination, a block that won a merge in an earlier round can still
lose a merge in a later round. The substitution used to record this
as a chain: the earlier loser mapped to a block that was itself
eliminated. Applying such a substitution left edges to eliminated
blocks in the Cmm graph, eventually leading to a
setInfoTableStackMap panic (#27368).
Now each round's substitutions are applied to the existing ones as
they are added (extendSubst), keeping the substitution idempotent:
every label maps directly to a surviving block.
Fixes #27368.
Assisted-by: Claude Fable 5.1
- - - - -
4 changed files:
- + changelog.d/27368
- compiler/GHC/Cmm/CommonBlockElim.hs
- + testsuite/tests/codeGen/should_compile/T27368.hs
- testsuite/tests/codeGen/should_compile/all.T
Changes:
=====================================
changelog.d/27368
=====================================
@@ -0,0 +1,5 @@
+section: compiler
+synopsis: Fix a ``setInfoTableStackMap`` panic caused by common block elimination
+ leaving references to eliminated blocks.
+issues: #27368
+mrs: !16765
=====================================
compiler/GHC/Cmm/CommonBlockElim.hs
=====================================
@@ -90,6 +90,10 @@ elimCommonBlocks g =
-- (so avoid comparing them again)
type DistinctBlocks = [CmmBlock]
type Key = [Label]
+
+-- | A substitution maps each eliminated block to its replacement.
+--
+-- Invariant: the substitution is idempotent, i.e. no value is a key.
type Subst = LabelMap BlockId
-- The outer list groups by hash. We retain this grouping throughout.
@@ -108,9 +112,19 @@ iterate subst blocks
where
(new_subst2, db) = mergeBlockList subst dbs
- subst' = subst `mapUnion` new_substs
+ subst' = extendSubst subst new_substs
updated_blocks = map (map (first (map (lookupBid subst')))) merged_blocks
+-- | Add the substitutions of one round of 'iterate'.
+--
+-- A block that won a merge in an earlier round may have lost one in this
+-- round, so the older substitutions are updated to keep the result idempotent.
+extendSubst :: Subst -> Subst -> Subst
+extendSubst subst new = assert (idempotent subst') subst'
+ where
+ subst' = mapMap (lookupBid new) subst `mapUnion` new
+ idempotent s = not (any (`mapMember` s) s)
+
-- Combine two lists of blocks.
-- While they are internally distinct they can still share common blocks.
mergeBlocks :: Subst -> DistinctBlocks -> DistinctBlocks -> (Subst, DistinctBlocks)
@@ -218,9 +232,7 @@ dont_care _other = False
eqBid :: LabelMap BlockId -> BlockId -> BlockId -> Bool
eqBid subst bid bid' = lookupBid subst bid == lookupBid subst bid'
lookupBid :: LabelMap BlockId -> BlockId -> BlockId
-lookupBid subst bid = case mapLookup bid subst of
- Just bid -> lookupBid subst bid
- Nothing -> bid
+lookupBid subst bid = mapFindWithDefault bid bid subst
-- Middle nodes and expressions can contain BlockIds, in particular in
-- CmmStackSlot and CmmBlock, so we have to use a special equality for
=====================================
testsuite/tests/codeGen/should_compile/T27368.hs
=====================================
@@ -0,0 +1,17 @@
+-- Common block elimination merges the duplicated blocks over several
+-- rounds. Compiling this at -O panicked in setInfoTableStackMap (#27368).
+
+module T27368 (f) where
+
+{-# NOINLINE put #-}
+put :: Int -> Int -> IO ()
+put h x = if h + x == 12345 then errorWithoutStackTrace "boom" else pure ()
+
+data T = N | J Int | K
+
+f :: Int -> Bool -> T -> IO ()
+f h a t = do
+ if a
+ then do put h 1; case t of { N -> pure (); J _ -> put h 3; K -> put h 4 }; put h 0; put h 0; put h 0; put h 0
+ else do put h 2; case t of { N -> pure (); J _ -> put h 3; K -> put h 4 }; put h 0; put h 0; put h 0; put h 0
+ put h 0
=====================================
testsuite/tests/codeGen/should_compile/all.T
=====================================
@@ -150,3 +150,5 @@ test('T16351', normal, compile, ['-O2 -ddump-simpl -dno-typeable-binds -dsuppres
test('T20298a', normal, compile, ['-O2 -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
test('T20298b', normal, compile, ['-O2 -dno-bignum-rules -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
test('T20298c', normal, compile, ['-O2 -dno-builtin-rules -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
+
+test('T27368', normal, compile, ['-O'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/64604b2c898eacffdb63bbc9ceee1c4…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/64604b2c898eacffdb63bbc9ceee1c4…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/sjakobi/T27368-cbe-expand-subst] Cmm: keep the CBE substitution chain-free
by Simon Jakobi (@sjakobi) 05 Oct '26
by Simon Jakobi (@sjakobi) 05 Oct '26
05 Oct '26
Simon Jakobi pushed to branch wip/sjakobi/T27368-cbe-expand-subst at Glasgow Haskell Compiler / GHC
Commits:
c02fe2c9 by Simon Jakobi at 2026-10-05T01:18:46+02:00
Cmm: keep the CBE substitution chain-free
When blocks are merged over multiple rounds during common block
elimination, a block that won a merge in an earlier round can still
lose a merge in a later round. The substitution used to record this
as a chain: the earlier loser mapped to a block that was itself
eliminated. Applying such a substitution left edges to eliminated
blocks in the Cmm graph, eventually leading to a
setInfoTableStackMap panic (#27368).
Now each round's substitutions are applied to the existing ones as
they are added (extendSubst), so every label maps directly to a
surviving block and lookupBid no longer needs to chase chains.
Fixes #27368.
Assisted-by: Claude Fable 5.1
- - - - -
4 changed files:
- + changelog.d/27368
- compiler/GHC/Cmm/CommonBlockElim.hs
- + testsuite/tests/codeGen/should_compile/T27368.hs
- testsuite/tests/codeGen/should_compile/all.T
Changes:
=====================================
changelog.d/27368
=====================================
@@ -0,0 +1,5 @@
+section: compiler
+synopsis: Fix a ``setInfoTableStackMap`` panic caused by common block elimination
+ leaving references to eliminated blocks.
+issues: #27368
+mrs: !16765
=====================================
compiler/GHC/Cmm/CommonBlockElim.hs
=====================================
@@ -90,6 +90,10 @@ elimCommonBlocks g =
-- (so avoid comparing them again)
type DistinctBlocks = [CmmBlock]
type Key = [Label]
+
+-- | A substitution maps each eliminated block to its replacement.
+--
+-- Invariant: no value is a key, i.e. there are no chains @x->y->z@.
type Subst = LabelMap BlockId
-- The outer list groups by hash. We retain this grouping throughout.
@@ -108,9 +112,19 @@ iterate subst blocks
where
(new_subst2, db) = mergeBlockList subst dbs
- subst' = subst `mapUnion` new_substs
+ subst' = extendSubst subst new_substs
updated_blocks = map (map (first (map (lookupBid subst')))) merged_blocks
+-- | Add the substitutions of one round of 'iterate'.
+--
+-- A block that won a merge in an earlier round may have lost one in this
+-- round, so the older substitutions are updated to keep the result chain-free.
+extendSubst :: Subst -> Subst -> Subst
+extendSubst subst new = assert (chainFree subst') subst'
+ where
+ subst' = mapMap (lookupBid new) subst `mapUnion` new
+ chainFree s = not (any (`mapMember` s) s)
+
-- Combine two lists of blocks.
-- While they are internally distinct they can still share common blocks.
mergeBlocks :: Subst -> DistinctBlocks -> DistinctBlocks -> (Subst, DistinctBlocks)
@@ -218,9 +232,7 @@ dont_care _other = False
eqBid :: LabelMap BlockId -> BlockId -> BlockId -> Bool
eqBid subst bid bid' = lookupBid subst bid == lookupBid subst bid'
lookupBid :: LabelMap BlockId -> BlockId -> BlockId
-lookupBid subst bid = case mapLookup bid subst of
- Just bid -> lookupBid subst bid
- Nothing -> bid
+lookupBid subst bid = mapFindWithDefault bid bid subst
-- Middle nodes and expressions can contain BlockIds, in particular in
-- CmmStackSlot and CmmBlock, so we have to use a special equality for
=====================================
testsuite/tests/codeGen/should_compile/T27368.hs
=====================================
@@ -0,0 +1,17 @@
+-- Common block elimination merges the duplicated blocks over several
+-- rounds. Compiling this at -O panicked in setInfoTableStackMap (#27368).
+
+module T27368 (f) where
+
+{-# NOINLINE put #-}
+put :: Int -> Int -> IO ()
+put h x = if h + x == 12345 then errorWithoutStackTrace "boom" else pure ()
+
+data T = N | J Int | K
+
+f :: Int -> Bool -> T -> IO ()
+f h a t = do
+ if a
+ then do put h 1; case t of { N -> pure (); J _ -> put h 3; K -> put h 4 }; put h 0; put h 0; put h 0; put h 0
+ else do put h 2; case t of { N -> pure (); J _ -> put h 3; K -> put h 4 }; put h 0; put h 0; put h 0; put h 0
+ put h 0
=====================================
testsuite/tests/codeGen/should_compile/all.T
=====================================
@@ -150,3 +150,5 @@ test('T16351', normal, compile, ['-O2 -ddump-simpl -dno-typeable-binds -dsuppres
test('T20298a', normal, compile, ['-O2 -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
test('T20298b', normal, compile, ['-O2 -dno-bignum-rules -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
test('T20298c', normal, compile, ['-O2 -dno-builtin-rules -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
+
+test('T27368', normal, compile, ['-O'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c02fe2c90bf92db5c30468bd1dfae44…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c02fe2c90bf92db5c30468bd1dfae44…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0
[Git][ghc/ghc][wip/sjakobi/T27368-cbe-expand-subst] Cmm: keep the CBE substitution chain-free
by Simon Jakobi (@sjakobi) 05 Oct '26
by Simon Jakobi (@sjakobi) 05 Oct '26
05 Oct '26
Simon Jakobi pushed to branch wip/sjakobi/T27368-cbe-expand-subst at Glasgow Haskell Compiler / GHC
Commits:
63c9eb84 by Simon Jakobi at 2026-10-05T00:58:03+02:00
Cmm: keep the CBE substitution chain-free
When blocks are merged over multiple rounds during common block
elimination, a block that won a merge in an earlier round can still
lose a merge in a later round. The substitution used to record this
as a chain: the earlier loser mapped to a block that was itself
eliminated. Applying such a substitution left edges to eliminated
blocks in the Cmm graph, eventually leading to a
setInfoTableStackMap panic (#27368).
Now each round's substitutions are applied to the existing ones as
they are added (extendSubst), so every label maps directly to a
surviving block and lookupBid no longer needs to chase chains.
Fixes #27368.
Assisted-by: Claude Fable 5.1
- - - - -
4 changed files:
- + changelog.d/27368
- compiler/GHC/Cmm/CommonBlockElim.hs
- + testsuite/tests/codeGen/should_compile/T27368.hs
- testsuite/tests/codeGen/should_compile/all.T
Changes:
=====================================
changelog.d/27368
=====================================
@@ -0,0 +1,5 @@
+section: compiler
+synopsis: Fix a ``setInfoTableStackMap`` panic caused by common block elimination
+ leaving references to eliminated blocks.
+issues: #27368
+mrs: !16543
=====================================
compiler/GHC/Cmm/CommonBlockElim.hs
=====================================
@@ -90,6 +90,10 @@ elimCommonBlocks g =
-- (so avoid comparing them again)
type DistinctBlocks = [CmmBlock]
type Key = [Label]
+
+-- | A substitution maps each eliminated block to its replacement.
+--
+-- Invariant: no value is a key, i.e. there are no chains @x->y->z@.
type Subst = LabelMap BlockId
-- The outer list groups by hash. We retain this grouping throughout.
@@ -108,9 +112,19 @@ iterate subst blocks
where
(new_subst2, db) = mergeBlockList subst dbs
- subst' = subst `mapUnion` new_substs
+ subst' = extendSubst subst new_substs
updated_blocks = map (map (first (map (lookupBid subst')))) merged_blocks
+-- | Add the substitutions of one round of 'iterate'.
+--
+-- A block that won a merge in an earlier round may have lost one in this
+-- round, so the older substitutions are updated to keep the result chain-free.
+extendSubst :: Subst -> Subst -> Subst
+extendSubst subst new = assert (chainFree subst') subst'
+ where
+ subst' = mapMap (lookupBid new) subst `mapUnion` new
+ chainFree s = not (any (`mapMember` s) s)
+
-- Combine two lists of blocks.
-- While they are internally distinct they can still share common blocks.
mergeBlocks :: Subst -> DistinctBlocks -> DistinctBlocks -> (Subst, DistinctBlocks)
@@ -218,9 +232,7 @@ dont_care _other = False
eqBid :: LabelMap BlockId -> BlockId -> BlockId -> Bool
eqBid subst bid bid' = lookupBid subst bid == lookupBid subst bid'
lookupBid :: LabelMap BlockId -> BlockId -> BlockId
-lookupBid subst bid = case mapLookup bid subst of
- Just bid -> lookupBid subst bid
- Nothing -> bid
+lookupBid subst bid = mapFindWithDefault bid bid subst
-- Middle nodes and expressions can contain BlockIds, in particular in
-- CmmStackSlot and CmmBlock, so we have to use a special equality for
=====================================
testsuite/tests/codeGen/should_compile/T27368.hs
=====================================
@@ -0,0 +1,17 @@
+-- Common block elimination merges the duplicated blocks over several
+-- rounds. Compiling this at -O panicked in setInfoTableStackMap (#27368).
+
+module T27368 (f) where
+
+{-# NOINLINE put #-}
+put :: Int -> Int -> IO ()
+put h x = if h + x == 12345 then errorWithoutStackTrace "boom" else pure ()
+
+data T = N | J Int | K
+
+f :: Int -> Bool -> T -> IO ()
+f h a t = do
+ if a
+ then do put h 1; case t of { N -> pure (); J _ -> put h 3; K -> put h 4 }; put h 0; put h 0; put h 0; put h 0
+ else do put h 2; case t of { N -> pure (); J _ -> put h 3; K -> put h 4 }; put h 0; put h 0; put h 0; put h 0
+ put h 0
=====================================
testsuite/tests/codeGen/should_compile/all.T
=====================================
@@ -150,3 +150,5 @@ test('T16351', normal, compile, ['-O2 -ddump-simpl -dno-typeable-binds -dsuppres
test('T20298a', normal, compile, ['-O2 -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
test('T20298b', normal, compile, ['-O2 -dno-bignum-rules -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
test('T20298c', normal, compile, ['-O2 -dno-builtin-rules -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques'])
+
+test('T27368', normal, compile, ['-O'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/63c9eb8459bfab4d6829763d06f72c7…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/63c9eb8459bfab4d6829763d06f72c7…
You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
1
0