Skip to content

Setup.hs preprocessor run too late #946

@gibiansky

Description

@gibiansky

I have the following Setup.hs with build-type: Custom:

import           Distribution.Simple
import           System.Process (system)

main = defaultMainWithHooks
         simpleUserHooks { preConf = \args confFlags -> do
           system "./build-parser.sh"
           preConf simpleUserHooks args confFlags }

This generates a module named Reskin.Parser in src/Reskin/Parser.hs. If I don't include Reskin.Parser in other-modules, things work; if I do, stack complains that Parser.hs doesn't exist (instead of just running Setup.hs which generates Parser.hs in the right place).

This is using stack just upgraded today via stack upgrade --git. I can get this to work only if I run cabal configure

Is this a me problem or a stack problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions