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

Provide an Automatic-Module-Name #9376

Open
pedrolamarao opened this issue Jun 9, 2022 · 6 comments
Open

Provide an Automatic-Module-Name #9376

pedrolamarao opened this issue Jun 9, 2022 · 6 comments
Labels
api: cloudkms Issues related to the Cloud Key Management Service API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@pedrolamarao
Copy link

Is your feature request related to a problem? Please describe.
It is currently not possible to create modular applications which depend on google-cloud-kms it is not module-ready.

Describe the solution you'd like
Define an Automatic-Module-Name in MANIFEST.MF to make google-cloud-kms module-ready.

Describe alternatives you've considered
The only alternatives are giving up creating modular applications or repackaging google-cloud-kms to add the required metadata.

Additional context
Providing Automatic-Module-Name has no impact on non-modular applications or applications targeting Java 8.

@product-auto-label product-auto-label bot added the api: cloudkms Issues related to the Cloud Key Management Service API. label Jun 9, 2022
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 10, 2022
@Neenu1995 Neenu1995 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Jun 10, 2022
@Neenu1995
Copy link
Contributor

Hi @pedrolamarao,
Is the default module name from the jar not useable in this instance?

@pedrolamarao
Copy link
Author

Hi @pedrolamarao, Is the default module name from the jar not useable in this instance?

Tools like Gradle will not place a JAR in the module path if that JAR does not contain module metadata.
Forcing the tool is non-trivial.
Defining Automatic-Module-Name is, on the other hand, trivial.

@pedrolamarao
Copy link
Author

If there is no objection to this addition, I would gladly provide PRs for all required modules.

@suztomo
Copy link
Member

suztomo commented Jun 13, 2022

@pedrolamarao By any chance, are you able to solve gRPC's module problem already (grpc/grpc-java#3522)? If so, would you share how you setup your project? We'd like to learn how people are using Java modules.

@pedrolamarao
Copy link
Author

We are currently using a trick where we split every affected module in two, the actual module depending on an "impl" automatic module. We define an Automatic-Module-Name on "impl" so that tools recognized it as module ready. Then, all classes which contain a reference to Google Cloud stuff goes to "impl". This is incredibly annoying, and is inducing people to give up on architecture and put unrelated things in the same "impl".

@suztomo
Copy link
Member

suztomo commented Apr 24, 2023

Moving to googleapis/google-cloud-java

@suztomo suztomo transferred this issue from googleapis/java-kms Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudkms Issues related to the Cloud Key Management Service API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants