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

support neverlink in scala_library #213

Closed
johnynek opened this issue Jun 2, 2017 · 14 comments
Closed

support neverlink in scala_library #213

johnynek opened this issue Jun 2, 2017 · 14 comments

Comments

@johnynek
Copy link
Member

johnynek commented Jun 2, 2017

java rules support this, but we don't.

@sdtwigg
Copy link
Contributor

sdtwigg commented Jun 2, 2017

This seems pretty straightforward to implement (just involves a little fiddling with setting up the jar lists in the provider). There might be a little incongruence with java interop until can safely use the new bazel CLs.

Do you know how to test it?

@ittaiz
Copy link
Member

ittaiz commented Jun 2, 2017 via email

@softprops
Copy link
Contributor

What is neverlink?

@sdtwigg
Copy link
Contributor

sdtwigg commented Jun 2, 2017

https://bazel.build/versions/master/docs/be/java.html#java_library.neverlink

Basically, when included, the jar is added to the compile path of dependents but not the runtime path or dependents (direct or transitive).

@ittaiz yes, a situation using neverlink just hasn't come up for me yet so would be aided by advice on testing it. (I suppose I could fake it by creating a neverlink target (with stub implementation) and then a similar target identical one (same interface, real implementation) that is included as a runtime_dep?)

@ittaiz
Copy link
Member

ittaiz commented Jun 3, 2017 via email

@kien-truong
Copy link

Do we have any progress on this ? It'd be very useful to strip down jars of Spark jobs.

@smparkes
Copy link
Contributor

FWIW, we had the spark use case and were able to get unblocked by using deploy_env:

https://docs.bazel.build/versions/master/be/java.html#java_binary.deploy_env
#576

@kien-truong
Copy link

Thanks for the tips. We've also succeeded in using deploy_env to strip out Spark's class.

@TheKaur
Copy link

TheKaur commented Oct 19, 2020

@ittaiz Are we going to support neverlink for scala_library?

@ittaiz
Copy link
Member

ittaiz commented Oct 19, 2020

We can.
I think we haven't because no one cared enough to add it.

@TheKaur
Copy link

TheKaur commented Oct 19, 2020

@ittaiz Is there someone who can help implement it? I am not at all versed with bazel code but can give it a shot if no one is available

@ittaiz
Copy link
Member

ittaiz commented Oct 19, 2020

@blorente @liucijus ?

@liucijus
Copy link
Collaborator

I will look into it

@liucijus
Copy link
Collaborator

Fixed by #1123

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

No branches or pull requests

8 participants