-
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
Split ModuleThreadContext off from ModuleFileGlobals #21749
Conversation
ModuleFileGlobals used to serve as both the definition of Starlark methods available in MODULE.bazel files, *and* the state tracker for a module being built. This commit brings it more in line with other Starlark evaluation contexts where there's a simple object that just holds methods, and the actual state is stored in the StarlarkThread. ModuleThreadContext is that state object. This commit is a pure mechanical refactor with no behavioral changes. It paves the way for us to allow root module MODULE.bazel files to import other files. Work towards #17880.
@zhengwei143 this PR includes a very small usage of |
@Wyverald Pretty sure this is the same issue as in #21702 (comment) |
https://github.com/bazelbuild/rules_java/releases/tag/7.5.0 has been released, we can just upgrade rules_java for Bazel. /cc @hvadehra |
|
ModuleFileGlobals used to serve as both the definition of Starlark methods available in MODULE.bazel files, *and* the state tracker for a module being built. This commit brings it more in line with other Starlark evaluation contexts where there's a simple object that just holds methods, and the actual state is stored in the StarlarkThread. ModuleThreadContext is that state object. This commit is a pure mechanical refactor with no behavioral changes. It paves the way for us to allow root module MODULE.bazel files to import other files. Work towards bazelbuild#17880. Closes bazelbuild#21749. PiperOrigin-RevId: 619261497 Change-Id: Ibff3a311e1788f7d8089ca194933cfb5fcc53ee0
ModuleFileGlobals used to serve as both the definition of Starlark methods available in MODULE.bazel files, *and* the state tracker for a module being built. This commit brings it more in line with other Starlark evaluation contexts where there's a simple object that just holds methods, and the actual state is stored in the StarlarkThread. ModuleThreadContext is that state object. This commit is a pure mechanical refactor with no behavioral changes. It paves the way for us to allow root module MODULE.bazel files to import other files. Work towards #17880. Closes #21749. PiperOrigin-RevId: 619261497 Change-Id: Ibff3a311e1788f7d8089ca194933cfb5fcc53ee0 Commit 9facaaa Co-authored-by: Xdng Yng <wyverald@gmail.com>
ModuleFileGlobals used to serve as both the definition of Starlark methods available in MODULE.bazel files, and the state tracker for a module being built. This commit brings it more in line with other Starlark evaluation contexts where there's a simple object that just holds methods, and the actual state is stored in the StarlarkThread. ModuleThreadContext is that state object.
This commit is a pure mechanical refactor with no behavioral changes. It paves the way for us to allow root module MODULE.bazel files to import other files.
Work towards #17880.