-
Notifications
You must be signed in to change notification settings - Fork 278
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
scala import should support neverlink #371
Comments
Was there anything done in this area already? Is there no support for compile only dependencies currently for scala? |
Nothing was done. I'll probably handle it sometime in the next month since we'll need it. |
@ittaiz can you maybe estimate the difficulty of these tasks? |
I think it wouldn't be too hard. We usually keep to sets of jars: compile jars and runtime jars. The rules are just ways to manage combining those. The trouble is: until now, runtime jars is a strict super set of compile jars. We may have an assumption of that in some places. If not, then just not putting a jar into the runtime jars when we see neverlink should do it. For instance: https://github.com/bazelbuild/rules_scala/blob/master/scala/scala_import.bzl#L9 search for "runtime" in that file and you'll get an idea how we are plumbing through. It is pretty easy to test for though, so it shouldn't be mysterious: just make a target that has a neverlink, then make a test that depends on it and verify that |
A bit short on time but essentially scala_import should be really easy. It's just a matter of omitting these jars from the transitive_compile_jars and transitive_runtime_jars sets. |
any updates? |
No. I will get to it eventually because I need it but it might take 1-2 months. |
done in #547 |
scala import should expose a neverlink attribute which if supplied means this target is to be used at compile time but not at runtime (similar but not identical to maven's provided scope)
Should probably wait for bazelbuild/bazel#3769 since
neverlink
is part of the designThe text was updated successfully, but these errors were encountered: