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

auto-value is included in the dependency #2807

Open
KengoTODA opened this issue Jul 21, 2023 · 3 comments
Open

auto-value is included in the dependency #2807

KengoTODA opened this issue Jul 21, 2023 · 3 comments
Assignees
Labels
api: bigquery Issues related to the googleapis/java-bigquery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@KengoTODA
Copy link

It seems that the auto-value is included in the dependency, and it makes runtime images (e.g. shaded jar files) unexpectedly large.

This package is used only in compilation time, so it is better to remove it from the runtime classpath.

Environment details

This issue is not related to the environment.

Steps to reproduce

  1. Visit https://mvnrepository.com/artifact/com.google.cloud/google-cloud-bigquery/2.30.1 to see dependencies, or
  2. run ./gradlew dependencies or mvn dependency:tree

Any additional information below

User may apply a workaround as follows:

// build.gradle.kts
dependencies {
    implementation("com.google.cloud:google-cloud-bigquery") {
        exclude("com.google.auto.value", "auto-value")
    }
}
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/java-bigquery API. label Jul 21, 2023
@obada-ab obada-ab added priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern. labels Jul 21, 2023
@Neenu1995
Copy link
Contributor

Hi @KengoTODA,
Thank you for pointing this out. But this looks like a user side work around.

Closing this as non-actionable. Feel free to reopen if you have any action items for the client library team.

@Neenu1995 Neenu1995 self-assigned this Jul 24, 2023
@KengoTODA
Copy link
Author

Hello, thanks for your quick response! 🙌

I believe it has action items; users surely have a workaround but it is better to be fixed on the project side. Is there some reason to keep this dependency as compile scope?

And it seems that I have no permission to reopen this issue. Do I need to open another issue?

Thanks in advance!

@Neenu1995
Copy link
Contributor

As recommended in the user guide for auto-value, the library imports the auto-value dependency with a provided scope. But looks like the flattening of pom before release is resulting in this dependency being listed as compile time dependency in maven central.

Thanks for bringing this to our attention.

@Neenu1995 Neenu1995 reopened this Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/java-bigquery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

3 participants