clean up bootstrap JSON generation - #11637
Conversation
|
I tested both the ghcup and Nix paths locally. |
I gave the manual QA a run, with Then again with I added some diagnostics, if that helps? $ git diff
diff --git a/Makefile b/Makefile
index cd5d0d20d..74473dfed 100644
--- a/Makefile
+++ b/Makefile
@@ -270,6 +270,9 @@ BOOT_NIX := $(shell nix-shell --version 2>/dev/null)
CABALCONF := $(shell if test -f $$HOME/.config/cabal/config; then echo CABAL_CONFIG=$$HOME/.config/cabal/config; fi)
bootstrap-json-%: phony
+ $(info INFO: ghcup --version is '$(BOOT_GHCUP)')
+ $(info INFO: nix-shell --version is '$(BOOT_NIX)')
+ $(info INFO: cabal config is '$(CABALCONF)') |
|
Here's what I have installed: |
|
The second one is just nobody ever bumping the permitted Temporarily setting your default ghc to 9.10 or earlier will get around it. |
|
General question for cabal devs: maybe the |
Yes that works. |
|
Another general question: various PRs might bump revisions in cabal files, but we only normally regenerate the JSONs before releases. Should PRs perhaps regenerate them as part of CI? And does this suggest that bootstrapping happens so rarely that it's all pretty much a waste of time? |
Yeah, I think it would reduce the friction.
Bootstrapping is used to build |
89ec9cb to
28b0307
Compare
Thing is, we only support bootstrapping from |
|
Anyway I think this is ready to merge, if someone would like to QA and review. |
|
Something went wrong with manual testing on my machine: |
|
Argh. I know what went wrong and will have to do some renaming in the |
18aab6b to
254f428
Compare
|
Kinda wish I could disable the warnings and such, but apparently the current behavior of |
2ec47e5 to
a4b9f6c
Compare
|
And this is demonstrating why I'm trying to move magic numbers into a |
a4b9f6c to
bfc0f7f
Compare
|
Sorry, fumbled my keyboard. Didn't mean to close this. |
|
No, that was a fumble and I thought I'd pushed removal of the old one. I'll do that shortly. |
941842e to
fcd4104
Compare
|
Hm. Considering that this confusion has come up multiple times (most recently @Bodigrim, but it also came up a couple months ago), should I rename |
Yes please. |
|
Okay, that (and comments in the script, and information about where people can get ghc if they don't have either ghcup or Nix) will be in the next push. |
fcd4104 to
0d777e8
Compare
|
I think we just got nailed by a new |
|
Ouch, sorry :) You can just replace |
The primary entrypoint is now `make bootstrap-jsons`, which is now documented and called out in `bootstrap/README.md`. It automatically tries to obtain ghc versions from first `ghcup`, falls back to Nix if `nix-shell` is found, and if all else fails warns the user to install the appropriate ghcs. The Nix script can still be used directly, but now obtains the list of ghc versions from the `Makefile`.
0d777e8 to
4d15200
Compare
Merge Queue Status
This pull request spent 1 hour 59 minutes 32 seconds in the queue, including 1 hour 49 minutes 22 seconds running CI. Required conditions to merge
|

The primary entrypoint is now
make bootstrap-jsons, which is now documented and called out inbootstrap/README.md. It automatically tries to obtain ghc versions from firstghcup, falls back to Nix ifnix-shellis found, and if all else fails warns the user to install the appropriate ghcs. The Nix script can still be used directly, but now obtains the list of ghc versions from theMakefile.Manual QA:
make bootstrap-jsonswithghcupin$PATHmake bootstrap-jsonswith noghcup(renaming it is fine) but with Nix (this may take several hours due to the existing Nix setup usingghc.nixinstead of nixpkgs)make bootstrap-jsonswith neither, verifying it warns that you need to install each veriioned GHC manuallyTemplate B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR:
Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).