Closed Mikolaj closed 2 years ago
Cabal
doesn’t understand bootstrapping, so you’ll need to do it manually.
cabal install happy -f -bootstrap
cabal install happy -f +bootstrap
Then it should work, assuming $HOME/.cabal/bin
is in your $PATH
.
My numerous CIs will be unamused. But @Ericson2314 is concocting a solution in cabal.project over at #haskell right now, so there is hope...
On my machine cabal build -fbootstrap
does not seem to work, even while happy
is in the PATH
:
$ cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library
$ happy --version
Happy Version 1.20.0 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow
$ cabal unpack happy-1.21.0
Unpacking to happy-1.21.0/
$ cd happy-1.21.0
$ cabal build
Resolving dependencies...
Build profile: -w ghc-8.10.6 -O1
In order, the following will be built (use -v for more details):
- happy-1.21.0 (exe:happy) (first run)
Configuring executable 'happy' for happy-1.21.0..
Preprocessing executable 'happy' for happy-1.21.0..
happy: /private/tmp/happy-1.21.0/./data//HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
$ cabal build -fbootstrap
Resolving dependencies...
Build profile: -w ghc-8.10.6 -O1
In order, the following will be built (use -v for more details):
- happy-1.21.0 (exe:happy) (configuration changed)
Configuring executable 'happy' for happy-1.21.0..
Preprocessing executable 'happy' for happy-1.21.0..
happy: /private/tmp/happy-1.21.0/./data//HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
Could we avoid this flag altogether? What if we declare an internal library (sharing hs-source-dirs
with happy
executable), which bootstraps from a parser-combination-based implementation (so it is happy
stage0) and is used to bootstrap happy
proper?
I have deprecated 1.21.0 on Hackage before anyone else's workflows get broken. Sorry for the disturbance.
@Bodigrim That is basically just what we are thinking :). I will try to make a two-exe, single package 1.21.1
, and on master
right now we are splitting things up so there will be less ugly sharing of source code between two components.
https://github.com/simonmar/happy/pull/212 this is my attempt, but now the issue is needing Cabal to understand that happy-boot
is to be used.
@Ericson2314, thank you, but my workflow get slightly broken because 1.21.0 appears in Stackage Nightly (https://github.com/commercialhaskell/stackage/issues/6252). I've used workaround with stack install happy :)
GHC 8.10.7, cabal 3.4: