-
Notifications
You must be signed in to change notification settings - Fork 277
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
Compiler dependencies with plus one and strict deps #1052
Comments
One way to address this problem is to export |
Have not actually tested to be for sure but I think the reason you need to add the dependency is because you are calling @ittaiz is this behavior what we want? (it seems reasonable to me personally but not sure if people agree with that). |
@liucijus did not quite see the relation to #867 (comment) as you mentioned in the other issue. |
@Jamie5 just want to say that we may need more complex heuristic to decide where the dep belongs in plus-one mode |
With second preview the constructors of records now get the same access modifier than the class (see JDK-8242479). For "record WithoutFields" this leads to an private empty default constructor which is filtered out by PrivateEmptyNoArgConstructorFilter. Removing private modifiers from records to have consistent results between first and second preview.
In some cases Scala compiler needs some deps to be on the classpath, which are not directly mentioned in the source code of the target. Such deps should come transitively with plus-one. Otherwise it is a coupling on the client side, which will will break if implementation target changes its dependencies. This becomes an issue if such coupling happens to an external dep implementation.
Repro: https://github.com/wix-playground/scala-unused-deps/tree/master/type_annotations
a.Hello
depends onb.LoggingProvider
, but it also asks to add//type_annotation/c
, which is implementation detail ofb.LoggingProvider
.If implementation of LoggingProvider is changed to use
d.BetterLogger
, it requires not only to addd
tob
, but alsod
toa
, and removec
froma
.The text was updated successfully, but these errors were encountered: