Skip to content

Allow 'includes = ["."]' in the root of the repo#625

Open
keith wants to merge 1 commit intobazelbuild:mainfrom
keith:ks/allow-includes-.-in-the-root-of-the-repo
Open

Allow 'includes = ["."]' in the root of the repo#625
keith wants to merge 1 commit intobazelbuild:mainfrom
keith:ks/allow-includes-.-in-the-root-of-the-repo

Conversation

@keith
Copy link
Member

@keith keith commented Mar 10, 2026

This isn't really something you want to do in a large project, but this
is a very common requirement of open source libraries that are part of
the BCR. Today they are buildable when pulled in through bzlmod, but not
when you're testing changes to them directly.

Bazel already adds an -iquote . to the root of the repo for all
builds, so if something is in your dependency tree, you can include it
relatively with the path from the root. If you want to guard against
that you can use layering_check to make sure deps are explicitly
defined.

Fixes #453

This isn't really something you want to do in a large project, but this
is a very common requirement of open source libraries that are part of
the BCR. Today they are buildable when pulled in through bzlmod, but not
when you're testing changes to them directly.

Bazel already adds an `-iquote .` to the root of the repo for all
builds, so if something is in your dependency tree, you can include it
relatively with the path from the root. If you want to guard against
that you can use layering_check to make sure deps are explicitly
defined.

Fixes bazelbuild#453
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

Successfully merging this pull request may close these issues.

Allow includes = ["."]

1 participant