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 sdist #256

Merged
merged 4 commits into from
Oct 1, 2023
Merged

Fix sdist #256

merged 4 commits into from
Oct 1, 2023

Conversation

int-index
Copy link
Collaborator

Fixes #255

The new release process is:

  1. runhaskell ./bootstrap.hs. This replaces .y and .ly files with .hs files, which applies to:
    • packages/frontend/src/Happy/Frontend/Parser/Bootstrapped.ly
    • packages/frontend/src/Happy/Frontend/AttrGrammar/Parser.ly
  2. cabal v2-sdist all

This results in the following tarballs:

dist-newstyle/sdist/happy-backend-lalr-2.0.tar.gz
dist-newstyle/sdist/happy-grammar-2.0.tar.gz
dist-newstyle/sdist/happy-tabular-2.0.tar.gz
dist-newstyle/sdist/happy-backend-glr-2.0.tar.gz
dist-newstyle/sdist/happy-codegen-common-2.0.tar.gz
dist-newstyle/sdist/happy-frontend-2.0.tar.gz
dist-newstyle/sdist/happy-2.0.tar.gz

Thanks to the ./bootstrap.hs step, the happy-frontend-2.0.tar.gz tarball contains *.hs files instead of Bootstrapped.ly and Parser.ly. This should fix the issues that the users of 1.21.0 encountered.

The bump to 2.0 is motivated by the split into packages. I believe it's a major change that enables the use of happy as a library, so it deserves a major version bump. It does not indicate a breaking change.

happy_boot = bootstrap_root </> "happy"
callProcess "cabal"
[ "install", "happy",
"-f", "-bootstrap",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"-f", "-bootstrap",
"-f", "+bootstrap",

Don't we want that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That would require a pre-installed happy

Copy link
Collaborator

Choose a reason for hiding this comment

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

No we don't

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With -f -bootstrap we don't, with -f +bootstrap we do. That's how this flag works, and I think you named it 😄

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry! I wasn't loading your comments, I meant to reply to myself not rudely reply to you! 😳 😬

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this is not the first time my own name for the flag has confused me 😅

Copy link
Member

Choose a reason for hiding this comment

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

I think this also confuses me.
I would think that -f +bootstrap would do something so that this instance of happy can build itself, whereas a -f -bootstrap would require another (already installed) instance of happy.
Or in other words, flag on does something special, flag off does the vanilla thing.

@andreasabel
Copy link
Member

@int-index wrote:

The new release process is:

These instructions shouldn't just reside in a closed PR, they need to go into DEVELOPER.md (or maybe CONTRIBUTING.rst).

Also the bootstrap.hs file should get a preamble with a purpose statement: What it achieves, when and how to invoke it.

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.

Happy refactoring (happy-1.21): either move forward or take it back
3 participants