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

Skylark rule for new_git_repository doesn't work for repos with a 'build' directory on MacOS #3127

Closed
jmillikin-stripe opened this issue Jun 5, 2017 · 0 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional)

Comments

@jmillikin-stripe
Copy link
Contributor

MacOS has a case-insensitive filesystem, which means mkdir build; echo "" > BUILD fails. This prevents the Skylark rules in tools/build_defs/repo/git.bzl from working with external repositories that have an existing build/ directory for legacy reasons.

In #552, a workaround was added to Bazel such that a file BUILD.bazel is also acceptable. Can you please change git.bzl to use this filename when writing its stub build rules?

def _new_git_repository_implementation(ctx):
  # ...
  if ctx.attr.build_file:
    ctx.symlink(ctx.attr.build_file, 'BUILD.bazel')
  else:
    ctx.file('BUILD.bazel', ctx.attr.build_file_content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional)
Projects
None yet
Development

No branches or pull requests

2 participants