-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #5697 Move stack to lts-19.16 (GHC 9.0.2) from lts-17.15 (GHC 8.10.4) #5736
Conversation
I may have unestimated what is required, as I see that the various tests have |
bbdbd37
to
c239db8
Compare
This revised pull request is now at the stage where the Windows-based tests (unit and integration) pass, but tests for other operating systems do not. I think that is because an updated 'docker' image is required, and I have raised an issue in the relevant repository. To summarise my approach to tests, with some exceptions, I replaced references to LTS resolvers with A test using For test For test For disabled test For test |
In respect of the CI on Unix-like operating systems, at fpco/alpine-haskell-stack#5 (comment) a kind offer has been made to enable a GHC 9.0.2 docker image in DockerHub, if somebody can send a pull request for it. The PR should target this branch: https://github.com/fpco/alpine-haskell-stack/tree/ghc902. Also, the latest stable alpine (possibly version 3.15.4) should be used as the base image. Can anybody reading this assist? |
The problem with the macOS integration tests, is things like this (extract):
It is looking for GHC 9.0.2 and not finding it, including at I think this part of app = App
{ appSimpleApp = simpleApp
, appRunghc = runghc
, appLibDir = libdir
, appSetupHome = \inner' -> withSystemTempDirectory "home" $ \newHome -> do
let newStackRoot = newHome </> ".stack"
createDirectoryIfMissing True newStackRoot
let modifyEnv'
= Map.insert "HOME" (fromString newHome)
. Map.insert "APPDATA" (fromString newHome)
. Map.insert "STACK_ROOT" (fromString newStackRoot)
writeFileBinary (newStackRoot </> "config.yaml") "system-ghc: true\ninstall-ghc: false\n"
withModifyEnvVars modifyEnv' inner'
, appTestDirs = testDirs
} What I can't currently identify is: where in the |
Where might it be looking for the 'system GHC'? There is also this in the log (extract, edited).
|
I've added something to |
The macOS integration tests are still failing (in the same way), despite the fact that GHC 9.0.2 should be on the
|
I am going to temporarily modify import StackTest
main :: IO ()
main = do
stack ["--verbose", "build"] Now, we have this information below (extracts only). It looks like the compiler is found at I don't know if it is relevant but: GHC 9.0.2 ships with
|
If I build |
The error is flowing from this line in globalDump <- withProcessContext menv $ globalsFromDump pkg which leads, via |
That fixed the specific problem on
The command that is falling over is (edited):
which I think is being called in |
f2bdb11
to
1272d3c
Compare
I just saw this PR, I have been working on similar one but for GHC 9.2.2. I will see if I can merge your changes to my branch. |
As GHC 9.2.2 is said to be broken for some Windows users, I was waiting for GHC 9.2.3 to reach a Stackage resolver, and then to see if that version of GHC worked for all the important operating systems. EDIT: I see that |
@psibi, my sticking point on this pull request is getting the non-Windows CI to work. In the case of macOS, my current hypothesis is that there is an upstream issue with the |
Ah, I see. My plan is to get GHC 9.2.2 working and then move to GHC 9.2.3. I'm hoping that the it wouldn't be a huge change to migrate to 9.2.3.
Yeah, it seems to have appeared from today. If not, I would have started my work based out of GHC 9.2.3.
I just read your issue. That looks tricky and this migration seems more challenging that I estimated. |
@mpilgrem I have been working on directly adding support for GHC 9.2.3 now. Can you see why some integration tests fail for the windows environment: https://github.com/commercialhaskell/stack/runs/6832464770?check_suite_focus=true ? It seems it's for these three tests:
I will debug the MacOS failure on Monday further. I have the integration tests passing fine for Linux (atleast for GHC 9.2.2) and I have to just build a new Docker image to get that fixed. So in summary I think these are the things that are blocking for the new release:
|
@psibi, on the three integration tests failing under Windows:
tempDir <- if isWindows
then fromMaybe "" <$> lookupEnv "TEMP"
else return "/tmp"
let tempFP = tempDir ++ "/stderr"
_ <- forkIO $ withFile tempFP WriteMode
|
@mpilgrem Thanks for the various hints, I will try to apply them on Monday.
Yeah, I think did because I have the integration test suite passing for Linux GHC 9.2.2. Alsp, possibly do you think you can send the windows fixes (suggested above) to my branch (unless you want me to take your specifc fixes here, but I think it will lose your commit information) ? I think there is a quite a overlap in both of our PR, sorry for not collaborating with you earlier. I saw your PR after I started working on GHC 9.2.2 support. Proving the above window fixes work, I think there is only one remaning unresolved thing - to figure out the MacOS integration test suite failure. I'm planning into look into it on coming Monday, but since I don't have access to a Mac machine, it might be challenging for me. |
I was wrong. I just did the update for GHC 9.2.2 and not for 9.2.3. I guess fixing that should be trivial then. Thanks! |
…s-17.15 (GHC 8.10.4) Also seeks to update the tests to use a current stable release GHC compiler. `Stack.Test.runRepl` was not working, apparently because it was referring to a directory (`/tmp`, equivalent to `C:\tmp`) that did not exist. Uses `Stack.Prelude.sinkProcessStderrStdout` in `Stack.PackageDump.ghcPkgCmdArgs` in attempt to avoid `ghc-pkg-9.0.2: startProcess: posix_spawnp: invalid argument (Bad file descriptor)` on macOS. Also updates the scripts to `lts-19.7`. These have been tested with `stack script <script.hs> --no-run --compile --resolver=lts-19.7`. Adds `*.exe` to `.gitignore` (an artefact on Windows of testing scripts). Temporarily alter CI script to try and diagnose the macOS CI problem. Temporarily alter `111-custom-snapshot/Main.hs` to provide more information, to try and diagnose the macOS CI problem. Temporarily depend on fork of process to try and resolve the macOS CI problem.
Closing, as overtaken by #5763 (move Stack to GHC 9.2.4). |
Also corrects a typo in
stack-ghc-902.yaml
comment.Please also shortly describe how you tested your change. Bonus points for added tests! Tested by building, and using,
stack
.