google / hrepl

Interactive development for Bazel/Haskell rules
Apache License 2.0
47 stars 10 forks source link

Filter for haskell_binary|library|test #12

Open aherrmann opened 4 years ago

aherrmann commented 4 years ago

Closes https://github.com/google/hrepl/issues/10

These are the only kinds of targets that produce the compile_info_output_groups that hrepl requires. This is to avoid errors if non-Haskell targets are picked up as intermediate dependencies between targets specified on the command-line, e.g. through data dependencies. See #10.

This also enables users to call hrepl on wild-card targets. E.g. in the rules_haskell repository

hrepl //tests/binary-with-lib:all

Now no longer fails on with an error of the form

hrepl: .../tests/binary-with-lib/binary-with-lib@repl.HaskellCompile.pb: openBinaryFile: does not exist (No such file or directory)
blackgnezdo commented 4 years ago

Furthermore, this should help when running on big directories that otherwise leads to

haskell-check: exec: resource exhausted (Argument list too long)
aherrmann commented 4 years ago

Rebased on master.