-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
incompatible_merge_genfiles_directory: unify bazel-bin and bazel-genfiles directories #6761
Comments
…atible_merge_genfiles_directory` #6761 RELNOTES: New incompatible flag --incompatible_merge_genfiles_directory PiperOrigin-RevId: 222826123
One downstream project fails with |
Still blocked by Protobuf (protocolbuffers/protobuf#5691). |
@laurentlb FYI, Bazelisk + Incompatible flags couldn't catch this breakage. Because building with this flag seems have an impact on subsequent builds. |
For historical reasons, Bazel has two directories for generated files, although a future version of Bazel will remove the genfiles directory: bazelbuild/bazel#6761 Currently, rosmsg() copies all the source files (*.msg, *.srv) to the output directory, so that the directory structure matches the needs of ROS's codegen tools. It uses a hacky way of finding the paths to the transitive dependencies within the output directory, which includes a direct reference to genfiles. By using output_to_bindir=True, we can avoid the direct reference. Fixing the hack would involve rewriting the rosmsg() macro to use a rule, which wouldn't be too hard but might break compatibility. See #2. Change-Id: Ibae3451e1329e397329089aa6796c5477789c788 GitOrigin-RevId: e38ef5d
This will cause all of these scripts / code that assume existence of We can catch possible breakages due to this change using Buildkite iff the bazel-genfiles path is referenced within the build. However, many of the references are from configuration files and external scripts. How we can improve our imcompatible change infra to work with this kind of changes? I'm just wondering about the user experience of getting this in the next release, if some part of the bazel-external infrastructure breaks because the genfiles dir no longer exists, and I had no warning about it when using previous Bazel versions interactively. |
When testing downstream projects, we noticed very few issues. But it's true that it tests only within Bazel. Scripts that call Bazel and then look at the specific directory might break. Not sure what we can do, apart from advertising the change more loudly. |
Projects that rely on
|
The symlinks are, in a way, the only user facing filesystem level API that Bazel exposes. I also have no idea what else we can do. The Downstream pipeline has no visibility into the bazel-external build infra of our users :(
Completely agree. |
…ed by ClangImporter. genfiles_dir is already searched but is deprecated (bazelbuild/bazel#6761) and the C rules have been adding bin_dir to their quote include paths since June 2018, so we should catch up. RELNOTES: Swift modules that import C modules can now find headers located in the bazel-bin directory. PiperOrigin-RevId: 264958475
…ed by ClangImporter. genfiles_dir is already searched but is deprecated (bazelbuild/bazel#6761) and the C rules have been adding bin_dir to their quote include paths since June 2018, so we should catch up. RELNOTES: Swift modules that import C modules can now find headers located in the bazel-bin directory. PiperOrigin-RevId: 264958475
…ed by ClangImporter. genfiles_dir is already searched but is deprecated (bazelbuild/bazel#6761) and the C rules have been adding bin_dir to their quote include paths since June 2018, so we should catch up. RELNOTES: Swift modules that import C modules can now find headers located in the bazel-bin directory. PiperOrigin-RevId: 265051482
Check both "bazel-genfiles" and "bazel-bin" due bazelbuild/bazel#6761
…zel-bin/' instead of 'bazel-genfiles/' These directories are being unified (bazelbuild/bazel#6761), so the distinction is not meaningful, except that in earlier versions of Bazel (e.g. 0.24ish) only bazel-bin is written to. PiperOrigin-RevId: 282721127 Change-Id: I4028f0bb7ed93314c15fb3761762a30c5d647b42
bazel-bin and bazel-genfiles directories are unified. ref1) bazelbuild/bazel#6761 ref2) https://www.lijiaocn.com/%E9%A1%B9%E7%9B%AE/2018/12/17/envoy-02-ide.html
This was flipped over 3 years ago bazelbuild#6761
This was flipped over 3 years ago bazelbuild#6761
This was flipped over 3 years ago bazelbuild#6761
This was flipped over 3 years ago bazelbuild#6761
This was flipped over 3 years ago bazelbuild#6761
This was flipped over 3 years ago bazelbuild#6761
…ed by ClangImporter. genfiles_dir is already searched but is deprecated (bazelbuild/bazel#6761) and the C rules have been adding bin_dir to their quote include paths since June 2018, so we should catch up. RELNOTES: Swift modules that import C modules can now find headers located in the bazel-bin directory. PiperOrigin-RevId: 265051482
This makes path computation code shorter and more robust. In particular, it makes things work under Bazel flag --incompatible_merge_genfiles_directory (bazelbuild/bazel#6761).
We plan to unify the
bazel-bin
andbazel-genfiles
directories.This means that
bazel-genfiles
will point to the same location asbazel-bin
, since the distinction was not meaningful. This will allow us to make simplifications in Bazel and its API.See discussion: https://groups.google.com/d/msg/bazel-dev/5iq7n1soenA/xGM_M1NOCAAJ
The text was updated successfully, but these errors were encountered: