-
Notifications
You must be signed in to change notification settings - Fork 704
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
Plans that use bootstrapping to break cycles #7189
Comments
Build-tools is deprecated in version 2 format files and removed in version 3 format cabal files. That's not going to be the right approach: https://cabal.readthedocs.io/en/3.6/cabal-package.html?highlight=build-tools#pkg-field-build-tools |
@gbaz same issues happens with |
I tried with https://github.com/simonmar/happy/pull/212/files using a different name to avoid this and #3502, but then I hit there there is no way to say "use |
From the little I understand about this, #6459 is related, but it's a serious undertaking. |
@Mikolaj Yes, that required for this to work, thanks for pointing out. |
With build-tools-depends it gets introduced as a qualified goal. I think there are two things to do -- one is enable the same package version with different configs under different subgoals. The second is just to enable backtracking instead of hard failure on cycle detection (unless that may already occur!). Its an interesting problem and worthwhile to solve for the next release, if possible. |
The dependency solver should already be able to backtrack in response to a cycle. The cabal/cabal-install-solver/src/Distribution/Solver/Modular/Cycles.hs Lines 49 to 54 in 8760e3d
I think we would need to fix the TODO and implement #6459 to allow the solver to break the cycle by building the same version of happy with different flags. @Ericson2314 do you have the solver log (-v3) from trying to add a build-tool-depends dependency on happy so that I can check whether this is the problem? |
In haskell/happy#175 (no merged) I have
I would like to uncomment
build-tools: happy
to indicate that when bootstrapping, Happy does in fact depend on Happy, but then Cabal will complain of the cycle.There's a lot of nuance on exactly how to make this goal, but I figured I'd start with the problem first, now that I finally have a small example of it.
The text was updated successfully, but these errors were encountered: