Skip to content
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 happy bounds #565

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

shayne-fletcher
Copy link
Contributor

motivation for this change discussed in #563. for >=9.8 flavors, allow happy-2.0.2 in ghc-lib-parser build-tool-depends.

m4/fptools_happy.m4 informs configure which as of https://gitlab.haskell.org/ghc/ghc/-/commit/0029ca91c845dd4530eb2c4606ad5bd59775cec2 allows ==1.20.* || >= 2.0.2 && < 2.1

@shayne-fletcher shayne-fletcher requested a review from a team as a code owner October 23, 2024 11:13
Copy link

@dylant-da dylant-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending comment, approved

@@ -52,7 +52,10 @@ executable ghc-lib-gen

executable ghc-lib-build-tool
import: base
build-tool-depends: alex:alex, happy:happy < 2.0
if impl (ghc > 9.12.0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this bound instead check for 9.8?

Copy link
Contributor Author

@shayne-fletcher shayne-fletcher Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's a bit subtle. this choice affects the happy that we'll use in ghc-lib-gen that invokes the GHC configure stage in order to compute the modules that go into each of ghc-lib-parser and ghc-lib, not the happy build-tool-depends of those packages (building these packages does not involve configure and generally don't fail with happy-2.0.2, i.e. the point raised in #563 ). except on the current HEAD of the GHC source tree, configure will fail with happy > 1.20 (the change that admits happy 2.0.2 only went on master 2 weeks ago {see the referenced commit above}). so this checks that the GHC compiler we are working with is at least > ghc-9.12.1 (equivalently, the minimum ghc-lib-parser flavor is > ghc-9.12.1) so we can be sure that before enabling 2.0.2 for happy for the purposes of ghc-lib-gen, configure won't fail. in all other cases, 1.20.* works and will pass configure just fine so in tl;dr, this is what we want.

@dylant-da dylant-da merged commit 2ca3e31 into digital-asset:master Oct 28, 2024
40 checks passed
@shayne-fletcher shayne-fletcher deleted the relax-happy-bounds2 branch October 28, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants