haskell / happy

The Happy parser generator for Haskell
Other
291 stars 84 forks source link

Fix sdist #256

Closed int-index closed 1 year ago

int-index commented 1 year ago

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.

andreasabel commented 8 months ago

@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.