Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.35k stars 2k forks source link

API visibility - all non-public APIs should be in “implementation” package #27113

Closed saragluna closed 2 years ago

saragluna commented 2 years ago

In the review process of Sprig Cloud Azure 4.0, several classes are considered non-public APIs or chosen to expose later. We agree to move them to the "implementation" package.

saragluna commented 2 years ago

The *ClientBuilderFactory classes have been refactored in https://github.com/Azure/azure-sdk-for-java/pull/26409.

saragluna commented 2 years ago

For the *ConfigurationProperties classes, I've tried to make their visibility to package level, but it won't fit for most cases:

So this solution won't work.

lmolkova commented 2 years ago

@saragluna thanks for the info! would it be possible to explore an implementation package option that allows keeping shared classes accessible for other packages?

saragluna commented 2 years ago

Hi @lmolkova, moving the ConfigurationProperties classes to the implementation package will introduce another problem, for our `Autoconfiguration` classes will reference these classes in their constructors.

lmolkova commented 2 years ago

Hi @lmolkova, moving the ConfigurationProperties classes to the implementation package will introduce another problem, for our `Autoconfiguration` classes will reference these classes in their constructors.

It can still be done with constructor injection (constructor would stay package-private) or am I missing something?

saragluna commented 2 years ago

I will try to move them.

saragluna commented 2 years ago

@lmolkova the pr has been merged.

saragluna commented 2 years ago

Closing this issue now for all related classes have been moved to impl packages.