-
Notifications
You must be signed in to change notification settings - Fork 2.1k
add module-info for azure-resourcemanager #15163
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
Conversation
sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/module-info.java
Outdated
Show resolved
Hide resolved
srnagar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a couple of questions that we need to resolve.
| requires transitive com.azure.resourcemanager.network; | ||
| requires transitive com.azure.resourcemanager.storage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need network and storage also to be transitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fluent interfaces, we provide convenient configs when creating virtual machine, like withExistingPrimaryNetwork(Network network), withExistingStorageAccount(StorageAccount storageAccount). The Network comes from module of com.azure.resourcemanager.network, and the StorageAccount is from com.azure.resourcemanager.storage.
Thus it requires transitive keyword. Otherwise, the end users have to add additional requires statement explicitly when calling withExistingPrimaryNetwork/withExistingStorageAccount.
This is part of #14127.
As discussed with @JonathanGiles offline, we decide to use statement of
export ... to ...for the qualified exports. This is because the impls insidefluentcoreofazure-resourcemanager-resourcesare common classes across mutiple modules, while they are not required to expose to end users.Inside
module-info, we apply a fewrequires transitiveas there are a few methods allowingwith*Resource*(Creatable<*Resource*>)provided by other services. For example, there is methodwithNewStorageAccount(Creatable<StorageAccount>)inazure-resourcemanager-compute, of which theStorageAccountcomes fromazure-resourcemanager-storage.