Remove GHCJS - #12396
Open
philderbeast wants to merge 13 commits into
Open
Remove GHCJS#12396philderbeast wants to merge 13 commits into
philderbeast wants to merge 13 commits into
Conversation
philderbeast
marked this pull request as draft
September 29, 2026 17:26
philderbeast
force-pushed
the
remove/ghcjs
branch
from
September 29, 2026 17:38
a1f95f0 to
6ad0efa
Compare
philderbeast
marked this pull request as ready for review
September 29, 2026 19:10
zlonast
approved these changes
Sep 30, 2026
zlonast
left a comment
Collaborator
There was a problem hiding this comment.
Thank you very much for the work done!
philderbeast
force-pushed
the
remove/ghcjs
branch
from
September 30, 2026 13:45
1258820 to
d0da966
Compare
andreabedini
approved these changes
Oct 5, 2026
andreabedini
left a comment
Collaborator
There was a problem hiding this comment.
IIUC project fields like ghcjs-options and the like will now cause a unknown field warning, am I correct? It would be better to say "deprecated". The changelog say they are ignored, it might be worth being more specific.
Comment on lines
+158
to
+164
| (path, runArgs) <- | ||
| let exeName' = prettyShow $ exeName exe | ||
| in case compilerFlavor (compiler lbiForExe) of | ||
| GHCJS -> do | ||
| let (script, cmd, cmdArgs) = | ||
| GHCJS.runCmd | ||
| (withPrograms lbiForExe) | ||
| (i buildPref </> exeName' </> exeName') | ||
| script' <- tryCanonicalizePath script | ||
| return (cmd, cmdArgs ++ [script']) | ||
| _ -> do | ||
| p <- | ||
| tryCanonicalizePath $ | ||
| i buildPref </> exeName' </> (exeName' <.> exeExtension (hostPlatform lbiForExe)) | ||
| return (p, []) | ||
| in do | ||
| p <- | ||
| tryCanonicalizePath $ | ||
| i buildPref </> exeName' </> (exeName' <.> exeExtension (hostPlatform lbiForExe)) | ||
| return (p, []) |
Collaborator
There was a problem hiding this comment.
This ca be all collapsed now. runArgs is always [], path is tryCanonicalizePath ....
Collaborator
Author
There was a problem hiding this comment.
Thanks, I've removed runArgs and renamed path to exePath.
- Use uhc instead in tests that used ghcjs
philderbeast
force-pushed
the
remove/ghcjs
branch
from
October 5, 2026 11:25
d0da966 to
56396a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11609, removing GHCJS.
I'll squash commits before applying the merge label if this pull request is approved.
Important
The removed exceptions and
ghcjsVersionImplInfowere exported fromCabal,so this needs a major version bump.
GHCJS was a standalone compiler that predates the JavaScript backend of GHC, which shipped with GHC 9.6. Its repository has been dormant for years and Cabal's
Distribution.Simple.GHCJSmodule was a stranded, untested duplicate of the GHC module.What is removed
Distribution.Simple.GHCJSmodule and itsPackageTests/GHCJStest.--ghcjsflag and theghcjsandghcjs-pkgbuiltin programs, with theghcjs-*lines they contributed to the generated config file and the program lists in the help text and the manual.ghcjsVersionImplInfoand the GHCJS branch ofgetImplInfo.VersionMismatchJS(9001) andVersionMismatchGHCJS(4001) exceptions. Their codes are marked retired.GHCJS ->case left inCabalandcabal-install. None were reachable once configure could no longer produce the flavour.Selecting the flavour, with
compiler: ghcjsin a project file or on theSetup configurecommand line, now fails with a dedicated error:What is kept
Cabal-syntax, theGHCJSconstructor ofCompilerFlavor,PerCompilerFlavorand theghcjs-options,ghcjs-prof-options,ghcjs-shared-optionsandghcjs-prof-shared-optionsfields. Packages on Hackage use these fields and must keep parsing. The manual marks them deprecated and ignored.OS Ghcjsand theghcjs_HOST_OSCPP guards. These describe thejavascript-unknown-ghcjstarget that the JavaScript backend of GHC still uses, not the GHCJS compiler.Deprecation process
The deprecation process that asks for a four release window is skipped in favour of a faster removal I proposed on discourse. So far, we've received no objections.
QA Notes
cabal buildin a project withcompiler: ghcjsincabal.projectshould fail with[Cabal-4002]and the message above.cabal build --ghcjsshould be rejected as an unrecognised option.cabal build --helpshould no longer list--ghcjs, and the--with-PROGprogram list should no longer includeghcjsorghcjs-pkg.~/.config/cabal/configshould have noghcjs-location,ghcjs-pkg-location,ghcjs-optionsorghcjs-pkg-optionslines.ghcjs-options: -fooshould still configure and build with GHC, with no warning and no effect.Tests
PackageTests/GHCJS/NotSupportedchecks the new error.IntegrationTests2config test drops itsghcjs-*assertions and passes.project-config-sharedparser test usesuhcinstead ofghcjsas its sample flavour.doc/was regenerated withmake -B -C doc cmd-helpandmake users-guidebuilds the manual cleanly.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.