Skip to content

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

Closed

Description

@jmillikin-stripe

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)

Activity

  1. self-assigned this
    on Jun 7, 2017
  2. added
    P2
    on Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions