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

Package boundary crossing warning missing information #12527

Closed
ilanbiala opened this issue Nov 20, 2020 · 5 comments
Closed

Package boundary crossing warning missing information #12527

ilanbiala opened this issue Nov 20, 2020 · 5 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug

Comments

@ilanbiala
Copy link

ATTENTION! Please read and follow:

  • if this is a question about how to build / test / query / deploy using Bazel, or a discussion starter, send it to bazel-discuss@googlegroups.com
  • if this is a bug or feature request, fill the form below as best as you can.

Description of the problem / feature request:

I'm getting a number of warnings of the form:

WARNING: null crosses package boundary into package rooted at ...

What operating system are you running Bazel on?

Linux, Ubuntu 16.04.7 LTS.

What's the output of bazel info release?

release 3.4.1

Have you found anything relevant by searching the web?

I haven't found anything that is closely related to this issue of "null" being mentioned in the warning, which seems to substitute for what is normally more useful information in other people's cases.

@sventiffe
Copy link
Contributor

Can you share information how to reproduce the issue, please?

@ilanbiala
Copy link
Author

I'm not sure of the exact way to reproduce, but I believe it has to do with having the following config setting in .bazelrc:

# https://github.com/bazelbuild/bazel/commit/c64421bc35214f0414e4f4226cc953e8c55fa0d2
# https://github.com/bazelbuild/bazel/issues/8450
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1

and including a pkg_tar in a Docker image built using https://github.com/bazelbuild/rules_docker.

@aiuto
Copy link
Contributor

aiuto commented Nov 30, 2020

Do you have anything self contained?

@benjaminp
Copy link
Collaborator

You can see from the code how to trigger this:

$ mkdir -p dir/subdir
$ touch dir/subdir/BUILD
$ cat > BUILD
filegroup(
   name = 'data',
   srcs = ['dir'],
)
$ bazel --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 build //:data
INFO: Analyzed target //:data (1 packages loaded, 2 targets configured).
INFO: Found 1 target...
WARNING: null crosses package boundary into package rooted at dir/subdir
Target //:data up-to-date (nothing to build)
INFO: Elapsed time: 0.857s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action

RecursiveFilesystemTraversalFunction is written for fileset semantics not experimental, apparently abandoned feature TRACK_SOURCE_DIRECTORIES.

@ilanbiala
Copy link
Author

Not the particular case I had hit, but that above works. Is it possible to make it so that null is replaced with something more useful in this case?

@jin jin added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug untriaged labels Dec 4, 2020
@janakdr janakdr self-assigned this Dec 5, 2020
@janakdr janakdr added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed more data needed untriaged labels Dec 5, 2020
coeuvre pushed a commit to coeuvre/bazel that referenced this issue Jul 15, 2021
…s a package boundary.

We probably shouldn't cross package boundaries when collecting these entries in the first place, but we might as well put lipstick on this pig.

Closes bazelbuild#12527

PiperOrigin-RevId: 346344693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug
Projects
None yet
Development

No branches or pull requests

6 participants