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

Create a bazel build element #30

Open
BuildStream-Migration-Bot opened this issue Feb 3, 2021 · 5 comments
Open

Create a bazel build element #30

BuildStream-Migration-Bot opened this issue Feb 3, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@BuildStream-Migration-Bot

See original issue on GitLab
In GitLab by [Gitlab user @edbaunton] on Jul 30, 2018, 16:20

Background

Create an element that provides support for building with bazel.

Specifically, a bst would declare itself of kind bazel and BuildStream would take care of generating the WORKSPACE file by recursively scanning the dependencies of the element being built.

Task description

  • bazel would be executed inside the sandbox (not using a host tool)
  • The workspace file would identify the built sources to consume with new_local_repository rules; if it encounters a dependency of type bazel it would stage the sources rather than the binaries and consume the BUILD file to leverage bazel.
  • bazel would need access to a persistent disk cache (use _set_mount_source?) between BuildStream runs so as to take advantage of its built in caching. The bazel server will actually be torn down between runs but it is said to serialize its state between runs so the startup time will no be prohibitive.
  • Toolchain generation: we need to generate correct toolchain for the target platform and have that be considered as part of the key for the element.
@BuildStream-Migration-Bot BuildStream-Migration-Bot added the enhancement New feature or request label Feb 3, 2021
@BuildStream-Migration-Bot
Copy link
Author

In GitLab by [Gitlab user @cs-shadow] on Aug 1, 2018, 18:01

bazel would need access to a persistent disk cache (use _set_mount_source?) between BuildStream runs so as to take advantage of its built in caching. The bazel server will actually be torn down between runs but it is said to serialize its state between runs so the startup time will no be prohibitive.

I think we might be able to do slightly better than that - in the same way that sources get a cache directory, probably the elements should also get a cache directory and be trusted to be responsible for it. We can even make the cache directory a conditional that defaults to False if we believe that not many elements will need it.

This is a very self-contained issue but I doubt anything prior to bazel will need it.

@BuildStream-Migration-Bot
Copy link
Author

In GitLab by [Gitlab user @finnball] on May 3, 2019, 09:21

Was there a branch/any work done on this plugin?

@BuildStream-Migration-Bot
Copy link
Author

In GitLab by [Gitlab user @sstriker] on May 7, 2019, 14:11

Nothing public currently; we had an early stage PoC branch last year. Are you asking for a specific reason, or just out of interest?

@BuildStream-Migration-Bot
Copy link
Author

In GitLab by [Gitlab user @finnball] on May 7, 2019, 15:59

Using Buildstream to create generate the toolchain for Bazel to execute actions with could be of interest to us. I'm not sure if I'd have the time to get onto this soon but if I am given the opportunity, it'd be helpful to see any progress anyone had made on this.

@BuildStream-Migration-Bot
Copy link
Author

In GitLab by [Gitlab user @cphang] on Oct 11, 2019, 22:10

Was excited to discuss this at the build meet last week! This is also of interest in the libreML project for building tensorflow https://gitlab.com/libreml/libreml/issues/41

@gtristan gtristan transferred this issue from apache/buildstream Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant