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

Some dependencies in java-alloydb/google-cloud-alloydb module seem to have wrong dependency scopes. #10037

Open
HappyHacker123 opened this issue Nov 3, 2023 · 1 comment
Labels
api: alloydb Issues related to the AlloyDB API. priority: p3 Desirable enhancement or fix. May not be included in next release. status: blocked Resolving the issue is dependent on other work. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@HappyHacker123
Copy link

Description

Dependency "com.google.api.grpc:grpc-google-common-protos" and "com.google.api.grpc:grpc-google-iam-v1" in the java-alloydb/google-cloud-alloydb module is set to the default dependency scope "compile". However, it seems that they are only used for tests.

    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-common-protos</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-iam-v1</artifactId>
    </dependency>

Possible Outcome

This brings redundant compile time dependency not only for google-cloud-alloydb, but also for downstream projects using it. Changing dependency scope to test can help maintaining a correct and simpler dependency tree.

Solution

I modified the scopes to "test", proceeded to recompile the module, and then ran the tests. As a result of these modifications, the module compiled without issues, and all the tests were successfully passed.

@HappyHacker123
Copy link
Author

HappyHacker123 commented Nov 3, 2023

I raise a pr #10038 about this issue. Could you help me review this issue @suztomo @meltsufin? many thanks :)

@blakeli0 blakeli0 added priority: p2 Moderately-important priority. Fix may not be included in next release. api: alloydb Issues related to the AlloyDB API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 3, 2023
@zhumin8 zhumin8 added priority: p3 Desirable enhancement or fix. May not be included in next release. status: blocked Resolving the issue is dependent on other work. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: alloydb Issues related to the AlloyDB API. priority: p3 Desirable enhancement or fix. May not be included in next release. status: blocked Resolving the issue is dependent on other work. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants