-
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
Warning: Unable to save CompilerPaths cache: #6330
Comments
@kant2002, thanks for reporting. It looks to me like you are using GHCup to customise Stack's installation of GHC (https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation), because of the line:
So, this may be a GHCup bug rather than a Stack one. The basic problem seems to me to be that GHCup is promising to provide GHC 9.0.2 and is failing to do so. A work around might be to allow Stack to manage its GHC requirments. That would involve deleting the |
I forgot to mention that stack build/stack run seems tot be working fine. Also this EXE file is present and is executed seems to be correctly. |
Ok, so GHCup must be supplying GHC 9.0.2 (contrary to what I assumed above). |
Stack throws that warning in mres <-
case eres of
Left e -> do
prettyWarn $
flow "Trouble loading CompilerPaths cache:"
<> blankLine
<> string (displayException e)
pure Nothing
Right x -> pure x
case mres of
Just cp -> cp <$ logDebug "Loaded compiler information from cache"
Nothing -> do
cp <- inner
saveCompilerPaths cp `catchAny` \e ->
prettyWarn $
flow "Unable to save CompilerPaths cache:"
<> blankLine
<> string (displayException e)
pure cp I suspect the exception reported as a warning is thrown in compilerStatus <- liftIO $ getFileStatus $ toFilePath cpCompiler Perhaps it is something to do with the difference between EDIT: I am assuming that |
That is, the |
Bringing in @hasufell, as he is the expert in this field. |
@kant2002, one way to test my theory is that in the #!/bin/sh
set -eu
case $HOOK_GHC_TYPE in
bindist)
ghcdir=$(ghcup whereis --directory ghc "$HOOK_GHC_VERSION" || ghcup run --ghc "$HOOK_GHC_VERSION" --install) || exit 3
printf "%s/ghc" "${ghcdir}"
;;
git)
# TODO: should be somewhat possible
>&2 echo "Hook doesn't support installing from source"
exit 1
;;
*)
>&2 echo "Unsupported GHC installation type: $HOOK_GHC_TYPE"
exit 2
;;
esac I suspect the line |
@kant2002, the |
Ooh. That was lightning fast. I go to sleep and on next day before I at home this is fixed. Super cool! |
General summary/comments (optional)
Steps to reproduce
Not sure what steps:
Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; try { Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true } catch { Write-Error $_ }
Expected
I would like that
stack path --stack-root
returnc:\sr
.Actual
After running
stack path --stack-root
when add
--verbose
Stack version
Platform
Windows 10 x64
The text was updated successfully, but these errors were encountered: