stack-2.7.3 fails to build with pantry-0.5.3
Closed this issue · 12 comments
In the next Stackage LTS 18 build:
/var/stackage/work/unpack-dir/unpacked/stack-2.7.3-cefa331420e8110d586c063358a61f55a5b9f5213075d98dce5e85411c2669b6/src/Stack/Setup.hs:847:24: error:
• Couldn't match expected type ‘SimpleRepo’ with actual type ‘Repo’
• In the first argument of ‘withRepo’, namely ‘repo’
In the expression: withRepo repo
In a stmt of a 'do' block:
withRepo repo
$ do mcwd <- traverse parseAbsDir =<< view workingDirL
let cwd = fromMaybe (error "Invalid working directory") mcwd
threads <- view $ configL . to configJobs
let hadrianArgs = fmap T.unpack ...
hadrianScripts
| osIsWindows = hadrianScriptsWindows
| otherwise = hadrianScriptsPosix
....
|
847 | Pantry.withRepo repo $ do
| ^^^^
Note I have not actually confirmed that this is due to API change in pantry-0.5.3 but it seems highly likely since this just broke now.
Yes I have restricted pantry < 0.5.3 for lts-18.13.
I would recommend adding a corresponding Hackage revision to stack-2.7.3.
I typically try to follow PVP version number assignment fairly closely, though I don't worry about the preemptive upper bounds.
I'm trying to install stack via cabal, and I also encounter this issue.
Is there any way to resolve? (ghcup doesn't work as I'm on a arm based Mac)
(ghcup doesn't work as I'm on a arm based Mac)
ghcup works on arm based Mac, it's just that there's no (official) stack binary for that. I have built unofficial ones via the GHC gitlab CI, but I'm not going to redistribute them.
Is there any way to resolve?
cabal install --constraint='pantry < 0.5.3' stack
(ghcup doesn't work as I'm on a arm based Mac)
ghcup works on arm based Mac, it's just that there's no (official) stack binary for that. I have built unofficial ones via the GHC gitlab CI, but I'm not going to redistribute them.
Is there any way to resolve?
cabal install --constraint='pantry < 0.5.3' stack
I find that stack downloaded from it’s official website works :P
I find that stack downloaded from it’s official website works :P
Are you sure it's not using mac x86_64 binaries in rosetta compatibility mode? Because those are the only ones listed here: https://github.com/commercialhaskell/stack/releases/tag/v2.7.3
I find that stack downloaded from it’s official website works :P
Are you sure it's not using mac x86_64 binaries in rosetta compatibility mode? Because those are the only ones listed here: https://github.com/commercialhaskell/stack/releases/tag/v2.7.3
It is :(
So I still need to install it from cabal? If I want native?
Btw, are the ghc stack resolver downloaded still be x86? (But I think I can solve it by using system ghc)
are the ghc stack resolver downloaded still be x86?
stack will download correct GHC tarballs, but you should make sure that your resolver picks 8.10.7, because the others are defunct: https://github.com/commercialhaskell/stackage-content/blob/76791eb1b94a0f6e5122100dbffc63e5bb4c9e16/stack/stack-setup-2.yaml#L1428-L1446
I would recommend adding a corresponding Hackage revision to stack-2.7.3.
As a Hackage trustee I made a revision: https://hackage.haskell.org/package/stack-2.7.3/revisions/
I am going to close this issue given the passage of time and it seems to have been addressed.