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

Support ignoring of files and directories for external repository workspaces #9080

Closed
irengrig opened this issue Aug 5, 2019 · 7 comments
Closed
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request

Comments

@irengrig
Copy link
Contributor

irengrig commented Aug 5, 2019

Context: this idea was born during the discussion of Always-dirty repository rules proposal for solving the problems of work with managed directories in rules_nodejs.
(The proposal itself was declined)

Problem: inside the directories, symlinked by the custom repository rules, there are some BUILD files, which need to be ignored.
Repository rule will provide the alternative BUILD files description for targets inside the corresponding directories.

One of the approaches might be using .bazelignore file inside the external repository.
We need to create the design and implement it.

@irengrig irengrig self-assigned this Aug 5, 2019
@irengrig irengrig added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request untriaged labels Aug 5, 2019
@irengrig
Copy link
Contributor Author

irengrig commented Aug 5, 2019

@meteorcloudy
Copy link
Member

FYI, @irengrig I'm now working on this ;)

@meteorcloudy meteorcloudy added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Aug 14, 2019
@irengrig
Copy link
Contributor Author

Great!

@excavador
Copy link

Any updates?

@irengrig
Copy link
Contributor Author

irengrig commented Sep 9, 2019

Hi @excavador, @meteorcloudy, who is working on this, is on vacation until 27th of September.

I wonder if you also need to ignore files in external repositories for some other use case then for rules_nodejs?

@meteorcloudy
Copy link
Member

Sorry for the late rely.
I did some investigation on this before I went to vacation. It doesn't seem to be a trivial change, we need some time to work out a proper solution.
BTW, Bazel 1.0 is already cut, so this won't make it into 1.0.

@meteorcloudy
Copy link
Member

I found a bug in Bazel while doing the investigation, it will be fixed while we adding .bazelignore support for external repos.

meteorcloudy added a commit to meteorcloudy/bazel that referenced this issue Nov 29, 2019
RELNOTES[NEW]:
Similar to the [.bazelignore](https://docs.bazel.build/versions/master/guide.html#.bazelignore) in the main repository, a `.bazelignore` file in external repository will cause the specified directories to be ignored by Bazel. Bazel won't try to identify any packages under the directories, but the files can still be referenced in other BUILD files.

Fixes bazelbuild#10234
Fixes bazelbuild#9080

Closes bazelbuild#10261.

PiperOrigin-RevId: 282347073
Change-Id: I6322054e8680acf7dffcfbf85104fb17c6481834
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
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) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants