Skip to content

Build failure in happy-1.20.1 #250

Closed

Description

@ffaf1

Build failure reported on #cabal irc channel:

/data/artem/cabal/ci-falls-2023-02/happy-1.20.1/dist-newstyle/build/x86_64-linux/ghc-9.2.5/happy-1.20.1/x/happy/build/happy/happy-tmp/AttrGrammarParser.hs:494:5: error:
    Not in scope: ‘Bits.testBit’
    No module named ‘Bits’ is imported.
    |
494 |     Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `Prelude.mod` 16)

See CI.

Platform: Linux
GHC: 8.10.7, 9.4.4 and 9.2.5
happy: 1.20.1

Activity

  1. santiweight commented on Feb 6, 2023

    @santiweight

    We're getting hit by this right now too. Anyone had any luck fixing?

  2. santiweight commented on Feb 6, 2023

    @santiweight

    Since happy is an executable dependency (not a library), I don't know how to pin a specific version. The following worked for us:

     $ cabal update hackage.haskell.org,2023-02-06T10:26:33Z
     $ cabal freeze
    

    Since that index does not include happy 1.20.1. Recent indices here

  3. Mikolaj commented on Feb 6, 2023

    @Mikolaj
    Member
  4. santiweight commented on Feb 6, 2023

    @santiweight

    It's very likely because the CI script uses cabal update, and that the version of happy is not pinned. My fix above should work for you @Mikolaj

  5. Mikolaj commented on Feb 6, 2023

    @Mikolaj
    Member

    @santiweight: thank you! With some luck, a deprecation on Hackage is coming RSN, which should solve it.

  6. treeowl commented on Feb 6, 2023

    @treeowl
    Contributor

    The new version seems to have been deprecated now. I don't know how something like that made it to release.

  7. Ericson2314 commented on Feb 6, 2023

    @Ericson2314
    Collaborator

    @treeowl I am wondering too because this was a bugfix on a release branch.

  8. Mikolaj commented on Feb 6, 2023

    @Mikolaj
    Member

    CI cache kept the file that was not in a repo? Or repo kept a file that was not in .cabal (and CI did not include a build from unzipped cabal dist that haskell-ci normally does IIRC)?

  9. Ericson2314 commented on Feb 6, 2023

    @Ericson2314
    Collaborator

    @Mikolaj the non-master version had a....manually computed sdist. Maybe we forgot that step.

  10. ulysses4ever commented on Feb 7, 2023

    @ulysses4ever

    @Mikolaj I checked their CI script (generated by Haskell-CI): it seems to only cache the store. That shouldn't bring the problem you're alluding to, I think. John has a good guess, perhaps.

  11. Mikolaj commented on Feb 7, 2023

    @Mikolaj
    Member

    @ulysses4ever: you are right: on master branch they seem to cd to the directory created when unpacking cabal sdist and they do cabal check there and build there [edit; I'm not clear about "build" any more: they seem to remove the project file by that point]. So that should catch the problem. I haven't checked the non-master version though.

  12. andreasabel commented on Feb 7, 2023

    @andreasabel
    Member

    Not sure how this happened.
    If you look at the diff between 1.20.1 and 1.20.0, no bug was introduced: 1.20.0...1.20.1
    Also I successfully built happy from the candidate tarball for 1.20.1.
    There might be a non-standard release procedure for happy that I did not follow.
    I'll have a look.

  13. changed the title [-]Build failure[/-] [+]Build failure in happy-1.20.1[/+] on Feb 7, 2023
  14. Ericson2314 commented on Feb 7, 2023

    @Ericson2314
    Collaborator

    @andreasabel Did you upload the make sdist tarball or the one cabal produces?

  15. andreasabel commented on Feb 7, 2023

    @andreasabel
    Member

    @Ericson2314 wrote:

    Did you upload the make sdist tarball or the one cabal produces?

    Yeah, seems my blunder was that I went with the cabal sdist one...

    @ffaf1 wrote:

    Build failure reported on #cabal irc channel:

    /data/artem/cabal/ci-falls-2023-02/happy-1.20.1/dist-newstyle/build/x86_64-linux/ghc-9.2.5/happy-1.20.1/x/happy/build/happy/happy-tmp/AttrGrammarParser.hs:494:5: error:
        Not in scope: ‘Bits.testBit’
        No module named ‘Bits’ is imported.
        |
    494 |     Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `Prelude.mod` 16)
    

    I cannot reproduce this error. (Maybe this one happens if you try to bootstrap happy-1.20.1 with an old happy not in sync with the GHC version.)

    See CI.

    This reports an error I can reproduce:

    The program 'happy' is required but it could not be found

    So the problem of happy-1.20.1 seems to be that it cannot bootstrap. It needs happy installed already.

    I have uploaded a new candidate: https://hackage.haskell.org/package/happy-1.20.1.1/candidate
    This one seems to bootstrap, according to my testing.

    However, I should be prudent and wait for some independent verification this time...

    Anyone up to testing the new RC (in hostile environment)?

  16. ulysses4ever commented on Feb 7, 2023

    @ulysses4ever

    @andreasabel I reported this initially on IRC, and in the same environment where 1.20.1 failed 1.20.1.1 candidate builds fine. There's a bunch of -Wincomplete-uni-patterns though.

  17. andreasabel commented on Feb 7, 2023

    @andreasabel
    Member

    @andreasabel I reported this initially on IRC, and in the same environment where 1.20.1 failed 1.20.1.1 candidate builds fine. There's a bunch of -Wincomplete-uni-patterns though.

    @ulysses4ever : Thanks for testing!

    Maybe we should switch off the -Wincomplete-uni-patterns warning, to annoy users less. This release would be a chance to do so.

  18. andreasabel commented on Feb 7, 2023

    @andreasabel
    Member

    Maybe we should switch off the -Wincomplete-uni-patterns warning,

    I did this and updated the candidate.

  19. Ericson2314 commented on Feb 7, 2023

    @Ericson2314
    Collaborator

    @andreasabel are those warnings in happy itself or the generated code?

  20. andreasabel commented on Feb 7, 2023

    @andreasabel
    Member

    These are in happy itself and look like this:

    [ 9 of 19] Compiling Grammar          ( src/Grammar.lhs, /Users/abel/tmp/happy-1.20.1/dist-newstyle/build/x86_64-osx/ghc-9.2.5/happy-1.20.1/x/happy/build/happy/happy-tmp/Grammar.o )
    
    src/Grammar.lhs:503:33: warning: [-Wincomplete-uni-patterns]
        Pattern match(es) are non-exhaustive
        In a lambda abstraction:
            Patterns of type ‘AgRule’ not matched:
                SelfAssign _ _
                RightmostAssign _ _
                Conditional _
        |
    503 | >                      map     (\(SubAssign (i,ident) toks) -> (i,(ident,toks))) $ subRules
        |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

    The warning -Wincomplete-uni-patterns is new in GHC 9.2 and I think it does not make sense to report it on code that has been written for ancient GHCs and been stable for a long time.

  21. treeowl commented on Feb 7, 2023

    @treeowl
    Contributor

    @andreasabel I think it makes sense to turn off the warning for release. I also think it makes sense to turn it on in development and clean up the code when possible—it's always good to have a place to document why those cases shouldn't be able to happen.

  22. andreasabel commented on Feb 7, 2023

    @andreasabel
    Member

    Seems like I have more luck with the release of happy-1.20.1.1: https://github.com/BNFC/bnfc/actions/runs/3924987003/jobs/7112323965#step:17:46

    Completed happy-1.20.1.1 (exe:happy)

  23. andreasabel commented on Feb 7, 2023

    @andreasabel
    Member

    Next try, folks: https://hackage.haskell.org/package/happy-1.20.1.1

    Fingers crossed, I hope I don't awake to a sh*t storm tomorrow again! ;-)

  24. self-assigned this
    on Feb 7, 2023
  25. added
    build failure
    on Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

build failure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions