Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gazelle_cabal fails to execute on cabal because of Paths_* files #45

Open
googleson78 opened this issue Aug 31, 2022 · 2 comments
Open

Comments

@googleson78
Copy link
Contributor

googleson78 commented Aug 31, 2022

Describe the bug
gazelle_cabal fails to execute on https://github.com/haskell/cabal with the following error:

gazelle: cabalscan: MissingModuleFile {modulePath = "Paths_Cabal", cabalFile = "/home/googleson78/git/cabal/Cabal/Cabal.cabal", componentName = "Cabal"}
gazelle: exit status 1

I believe this is because Paths_Cabal doesn't have an associated file, as it is autogenerated. Other files like this should have the same issue, but Paths_* is encountered much more often in my experience.

To Reproduce

  1. Clone https://github.com/googleson78/cabal
  2. Checkout 3749f6089a015bf18d661f89efa6672613210455
  3. nix-shell
  4. bazel run //:gazelle
@googleson78 googleson78 changed the title gazelle_cabal fails to execute on cabal gazelle_cabal fails to execute on cabal because of Paths_* files Aug 31, 2022
@kczulko
Copy link
Contributor

kczulko commented Sep 2, 2022

Probably @facundominguez may know more about getting rid of Paths_* as he probably was running gazelle_cabal against cabal code. Essentially, I mean this context.

BTW: I was encountering the same behavior in case of bazelifiyng example-servant-elm

@facundominguez
Copy link
Member

When building Cabal, I wrote a Paths_Cabal.hs module instead of having cabal generate it:
facundominguez/cabal@4e0ab0d#diff-0028f8835685d6b965059b98ee873c6fbf4f1466097c0c82da6504d564aaa37c

Maybe we should list this workaround in the readme of gazelle_cabal. It doesn't look like generating the file with with gazelle_cabal would be easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants