-
Notifications
You must be signed in to change notification settings - Fork 696
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
cabal-install-3.8.1.0 update and sdist require ghc in PATH #8352
Comments
This is major blocker for using |
I don't know when it changed, but my guess would be that Would enabling |
Sufficient but ugly. Even if |
Indeed, this prevents |
Uh, oh, |
That's a probably a release blocker. Too bad, we've already released. Are there any workarounds for haskell-ci? A pity nobody tried 3.8.1.0-rc1 with haskell-ci. Is that reasonably easy to do for a haskell-ci user, for next time (3.8.1.0-rc1 was installable with ghcup)? |
I wasn't aware it was available through ghcup. It shouldn't be hard to test release candidates in the future. Though there is little insensitive as older cabal-install seems to work well enough. And that is a workaround for now: stick to using older |
Maybe 32259a1?
and cabal/cabal-install/src/Distribution/Client/ProjectPlanning.hs Lines 419 to 423 in 32259a1
Follow the trail and you will end up with the dreaded |
But is this ( |
Yes, see cabal/cabal-install/src/Distribution/Client/ProjectOrchestration.hs Lines 218 to 234 in 32259a1
and cabal/cabal-install/src/Distribution/Client/ProjectOrchestration.hs Lines 205 to 212 in 32259a1
and then cabal/cabal-install/src/Distribution/Client/CmdUpdate.hs Lines 111 to 116 in 32259a1
and up to the original |
Is it about the time to ping @gbaz?.. |
I'd suspect changes related to So possibly: #8109, but for be sure you should |
Good diagnosis! Looking now at the logic there, I'm not sure if this change in behavior is wrong, though it is surprising. In particular, that PR allows conditionals on ghc versions to be in project files. And... project files I believe have options that may affect even update and sdist? So If one does not have a ghc version, then when one reads a project file, as update and sdist must, then what should happen when a conditional is encountered? A change would I think have to be some sort of "defaulting" in the specific cases of commands that don't strictly need ghc, which seems pretty strange. It might be better to just change haskell-ci scripts to always make sure a ghc made available even for these commands? |
That is lazy approach (EDIT: and even then E.g. when |
And to expand on CI is a good place to work in highly hygienic environment, without humongous implicit state. I'd appreciate if |
"when haskell-ci calls cabal update there is no project file. What does cabal needs GHC then for. Why it spends cycles looking for it" As I described, update and sdist may both be affected by options in project files. Project files may now have conditionals. Those conditionals may branch on version of ghc (or an arch). Knowing how to branch on a version of ghc or its supported arch requires finding the ghc available and querying its version. A potential refactor would be to only query for ghc when such conditionals exist, but that would be extremely ad-hoc and also not at all fit with the current pipeline in terms of when things are pure and when they are not. Your argument for not having a systemwide ghc but only using --with-compiler makes a lot of sense, as a way to shake out bugs. But that said, it seems like changing the haskell ci scripts to pass those flags to these two commands seems straightforward? (edit: that said, its certainly an issue that sdist doesn't have a --with-compiler option, and I do think that would be an important fix, regardless) |
It won't be ad-hoc. There is |
What I mean is the following -- if we made that change, then using it, haskell-ci would work on most packages. But there would eventually be a package that had a conditional branch in its cabal.project, and haskell-ci would fail to work on that project, because in that specific instance it would need to figure out which ghc to use in order to fully parse the project. So I think it is better to make a change that lets everything always work on all projects, and that change is extending sdist to have a --with-compiler flag. |
|
... and as I said, even then taking an union of all branches should be enough for |
hmm if you have
EDIT: for
|
What about requiring ghc only if there are impl(ghc) branches? |
|
And there are no plans to generate cabal.project files with conditionals? at a first look it could be useful for haskell-ci. |
IMO it should not account for ghc ever. |
This is not just an opinion. |
Hmm sdist is not used to upload to hackage diretly, you could use another tool to generate the tarball to be uploaded and you can use the tar generated by sdist for other purposes. |
My release scripts do Regardless, the current behavior is a breaking change.
Are you suggesting that the ghc dependency is only due to the Shouldn't release commands always produce the same behavior regardless of the Haskell and OS platforms they run on? |
Includes workarounds for: haskell/cabal#8352 haskell/cabal#8370
Also affects GHC CI: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8943 |
A bug was fixed in cabal 3.8 (haskell/cabal#6771) that haskell.nix relied on for `pkg-config` in support. To work around this we added a dummy `pkg-config` that `cabal configure` now uses when haskell.nix runs it `cabal configure` internally. That returns version information for all the `pkg-config` packages in `lib/pkgconfig-nixpkgs-map.nix`. This mapping has also been expanded based on the results of searching nixpkgs for `*.pc` files. This update also includes workarounds for: haskell/cabal#8352 haskell/cabal#8370 haskell/cabal#8455
* Add cabal-issue-8352-workaround See haskell/cabal#8352 * More script fixes * More script fixes
resolved by #8358 |
Otherwise
I guess I'm required to pass
--with-compiler
now?The text was updated successfully, but these errors were encountered: