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

Add add_opens and add_exports support #1523

Open
timothyg-stripe opened this issue Nov 2, 2023 · 1 comment · May be fixed by #1551
Open

Add add_opens and add_exports support #1523

timothyg-stripe opened this issue Nov 2, 2023 · 1 comment · May be fixed by #1551

Comments

@timothyg-stripe
Copy link
Contributor

JDK 17 strongly encapsulates JDK internals, so many libraries need --add-opens= and --add-exports= JVM flags. Bazel's Java rules support adding those flags through java_library(add_opens = [...], add_exports = [...]), and these fields are read in Bazel's java_binary rule:

https://github.com/bazelbuild/bazel/blob/a2d3f20b577b8b5c7c5027a8a00f8c24a66228b9/src/main/starlark/builtins_bzl/common/java/java_binary.bzl#L173-L182

However it appears that the rules_scala doesn't read those fields when filling out the executable template:

Additionally, it would be nice if scala_library, scala_binary, and scala_import support add_opens and add_exports attributes also, but it's not as urgent as the first issue.

@timothyg-stripe
Copy link
Contributor Author

See bazelbuild/bazel#20033 on a Bazel-side blocker for Scala rules to have add_exports / add_opens attributes.

@timothyg-stripe timothyg-stripe linked a pull request Mar 7, 2024 that will close this issue
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 a pull request may close this issue.

1 participant