-
Notifications
You must be signed in to change notification settings - Fork 4
extra-source-files not visible #57
Comments
This proposal sounds reasonable to me. I recall Formation also had one or two packages that we had to make manual overrides for due to this issue. The reason all the files are arranged in one directory is that |
For a concrete example, the Hackage package
|
I think I just hit this exact issue, will give your PR a try @aherrmann |
Ah unfortunately Im running into issues building wai-app-static (some discussion here - tweag/rules_haskell#291 (comment)) and I was hoping your changes with the symlinks would also work for TH. It didn't appear to, although its not totally clear to me why. Also, it seems like wai-app-static no longer works even with the forking due to the name mangling (i.e. looking for |
I'm encountering a build failure when trying to use
cabal2bazel
on a Haskell library that makes use ofextra-source-files
and CPP#include
directives.For example, assume the following source files exist:
srcs/Some/Module.hs
,includes/Some.Module.hs
. And thatsrcs/Some/Module.hs
contains:And the cabal file contains:
Then the
cabal2bazel
build fails with an error of the formThe only reference to
extra-source-files
I could find is here, where it is used to construct-I
command-line flags to GHC. It looks like, contrary to other source files,extra-source-files
are not linked or copied into the working directory for builds. And even if they were, theinclude
path would still be broken becausecabal2bazel
arranges source files relative to theirhs-source-dirs
entry and not to their position in the original source tree.What is the reason for arranging source files relative to their
hs-source-dirs
entry instead of to their original position in the source tree? Couldn't the same effect be achieved by keeping files in their original source tree position and passing additional-i
arguments to GHC?This would allow to fix the above issue by simply linking or copying the
extra-source-files
into the build tree.The text was updated successfully, but these errors were encountered: