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

The "data" attribute doesn't allow files #236

Closed
judah opened this issue May 7, 2018 · 0 comments
Closed

The "data" attribute doesn't allow files #236

judah opened this issue May 7, 2018 · 0 comments

Comments

@judah
Copy link
Collaborator

judah commented May 7, 2018

The rules currently don't seem to allow files in the "data" attribute.

Example code: 522dc28

An example with cc_binary succeeds:

$  bazel build tests/binary-with-data:bin3
$ find bazel-bin/tests/binary-with-data/bin3.runfiles -name foo
bazel-bin/tests/binary-with-data/bin3.runfiles/io_tweag_rules_haskell/tests/binary-with-data/foo

But with haskell_binary, it fails:

$  bazel build tests/binary-with-data:binary-with-data
ERROR: /Users/judah.jacobson/repos/rules_haskell/tests/binary-with-data/BUILD:20:10: in data attribute of haskell_binary rule //tests/binary-with-data:bin1: file '//tests/binary-with-data:foo' is misplaced here (expected no files)

Might be as simple as adding an allow_files somewhere, though we'll want to add more test coverage to be sure.

judah added a commit to FormationAI/rules_haskell that referenced this issue May 7, 2018
Also adds a test that the data file is passed transitively through runfiles.
judah added a commit to FormationAI/rules_haskell that referenced this issue May 7, 2018
Also adds a test that the data file is passed transitively through runfiles.
@mboes mboes closed this as completed in f100266 May 8, 2018
mboes added a commit that referenced this issue May 8, 2018
Fix #236: allow files in "data" attributes.
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

1 participant