-
Notifications
You must be signed in to change notification settings - Fork 896
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
Some dependencies in /core module are in the wrong scope. #5581
Comments
Good point. We need to fix it.
DefaultCookies is a package private class so |
@ikhoon Thanks a lot for your prompt response and clarification!
You're right, I'm sorry to give a wrong example. But here's another example regarding exposed classses in guava. Could you please take a look?
Acually we found another dependency com.github.ben-manes.caffeine:caffeine whose scope may also need to be set to api due to the following usage.
|
Good question.
Though they have armeria/core/src/main/java/com/linecorp/armeria/internal/common/metric/package-info.java Line 18 in a13d582
In addition to Bouncycastle, we also shadow Guava dependency. If it is exposed in the public API, we should fix it instead of making it Lines 524 to 525 in a13d582
|
@ikhoon Thank you for your response :). I now have a thorough understanding of the situation, and the problem should be fixed according to armeria's actual implementation. Hope to hear it fixed soon :). |
….unix.common) (#5623) Motivation: Explain why you're making this change and what problem you're trying to solve. Modifications: From issue #5581, the class is exposed in the public API. > Class io.netty.channel.unix.DomainSocketAddress is used as public method parameter in core/src/main/java/com/linecorp/armeria/common/util/DomainSocketAddress.java Result: - Closes #5581. (If this resolves the issue.) - User can use [core] com.linecorp.armeria.common.util.DomainSocketAddress#asNettyAddress without adding dependency
….unix.common) (line#5623) Motivation: Explain why you're making this change and what problem you're trying to solve. Modifications: From issue line#5581, the class is exposed in the public API. > Class io.netty.channel.unix.DomainSocketAddress is used as public method parameter in core/src/main/java/com/linecorp/armeria/common/util/DomainSocketAddress.java Result: - Closes line#5581. (If this resolves the issue.) - User can use [core] com.linecorp.armeria.common.util.DomainSocketAddress#asNettyAddress without adding dependency
Description
The following dependencies in /core are set to scope implementation, but the expected scope should api.
According to gradle offcial doc, if a library contains classes that are exposed in the library binary interface, its dependency scope should be api. The above depedencies all contain classes exposed in binary interface as offical doc goes, I list one example of each dependency below.
Possible Outcome
This can lead to compilation failures in consumers, as mentioned in offical doc.
Solution
Change the dependency scope from implementation to api.
The text was updated successfully, but these errors were encountered: