Skip to content

cabal fails to build preprocessors when used with ghcjs #5632

Open
@vmchale

Description

@vmchale

When building my language-xats library with GHCJS the following occurs:

vanessa@thinkpad ~/programming/haskell/current/language-xats 🌸 cabal new-build --ghcjs
Warning: don't know how to find change monitoring files for the installed
package databases for ghcjs
Resolving dependencies...
Build profile: -w ghcjs-8.4.0.1 -O1
In order, the following will be built (use -v for more details):
 - alex-3.2.4 (exe:alex) (requires build)
 - happy-1.19.9 (exe:happy) (requires build)
 - prettyprinter-1.2.1 (lib) (requires build)
 - language-xats-0.1.0.0 (lib) (first run)
Starting     prettyprinter-1.2.1 (lib)
Starting     alex-3.2.4 (exe:alex)
Starting     happy-1.19.9 (all, legacy fallback)
Building     prettyprinter-1.2.1 (lib)
Building     alex-3.2.4 (exe:alex)
Installing   prettyprinter-1.2.1 (lib)
Completed    prettyprinter-1.2.1 (lib)
Installing   alex-3.2.4 (exe:alex)
Completed    alex-3.2.4 (exe:alex)
Building     happy-1.19.9 (all, legacy fallback)
Installing   happy-1.19.9 (all, legacy fallback)
Completed    happy-1.19.9 (all, legacy fallback)
Configuring library for language-xats-0.1.0.0..
cabal: The program 'alex' is required but it could not be found.

The build succeeds when I run cabal new-install alex ; cabal new-install happy.

I think that cabal should attempt to install happy and alex using GHC. I can't really see any reason that we'd want to use a node version of happy or a cross-compiled version of happy as they are preprocessors.

I believe this has been mentioned before: #4939

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions