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

rules_go query breaks on github.com/cloudflare/cfssl/ on macOS #175

Closed
jmhodges opened this issue Oct 28, 2016 · 3 comments
Closed

rules_go query breaks on github.com/cloudflare/cfssl/ on macOS #175

jmhodges opened this issue Oct 28, 2016 · 3 comments

Comments

@jmhodges
Copy link
Contributor

When using cloudflare/cfssl in new_go_repository, rules_go sees the script/build bash shell script and breaks. This happens only on case-insensitive file systems like macOS's.

Interestingly, there is no Go code in that package, so if rules_go was able to figure out that it wasn't a real BUILD file, or delay processing the BUILD file until after it found all the go packages in the repo, the problem might be fixable without also having to way for the bazel BUILD.bazel change to happen.

@jmhodges
Copy link
Contributor Author

Ah, now that I think about it, this is maybe a bazel problem? It only occurs when querying for all of the targets in that external repo.

$  bazel query @com_github_cloudflare_cfssl//...
ERROR: package contains errors: script.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:4:11: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:13:22: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:19:18: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:29:63: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:40:20: invalid character: '`'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:40:24: invalid character: '`'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:4:16: syntax error at '"$(dirname $0)"': expected ).
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:6:11: syntax error at '{': expected newline.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:10:1: syntax error at 'if': This is not supported in BUILD files. Move the block to a .bzl file and load it.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:2:6: name 'e' is not defined.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:4:12: contains syntax error(s).
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:6:1: name 'relabel' is not defined.

@jmhodges jmhodges changed the title gazelle breaks on github.com/cloudflare/cfssl/ on macOS rules_go query breaks on github.com/cloudflare/cfssl/ on macOS Oct 28, 2016
@katre
Copy link
Contributor

katre commented Oct 28, 2016

There's an open bug for this in the master bazel repo, see bazelbuild/bazel#552.

@katre katre closed this as completed Oct 28, 2016
@pmbethe09
Copy link
Contributor

bazel gets tripped up by files or directories named 'build' on
case-insensitive file systems. There is work in progress to solve this.

On Thu, Oct 27, 2016 at 11:26 PM, Jeff Hodges [email protected]
wrote:

Ah, now that I think about it, this is maybe a bazel problem? It only
occurs when querying for all of the targets in that external repo.

$ bazel query @com_github_cloudflare_cfssl//...
ERROR: package contains errors: script.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:4:11: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:13:22: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:19:18: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:29:63: invalid character: '$'.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:40:20: invalid character: ''. ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:40:24: invalid character: ''.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:4:16: syntax error at '"$(dirname $0)"': expected ).
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:6:11: syntax error at '{': expected newline.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:10:1: syntax error at 'if': This is not supported in BUILD files. Move the block to a .bzl file and load it.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:2:6: name 'e' is not defined.
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:4:12: contains syntax error(s).
ERROR: /private/var/tmp/_bazel_jmhodges/ee957dabdee1b1a9e1f2fe90369cf80f/external/com_github_cloudflare_cfssl/script/BUILD:6:1: name 'relabel' is not defined.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#175 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALF-0nlAgZTxdJ_W9iVlFUAcBMJHfInHks5q4WtRgaJpZM4KjCog
.

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