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

feat: refactor client module to resolve circular dependencies #2399

Merged
merged 6 commits into from
Aug 28, 2023

Conversation

DMwangnima
Copy link
Contributor

At the beginning, we planned to resolve circular dependencies by splitting configuration logics of config package to modules that they belong to. For example, move config.RegistryConfig and its configuration logics to registry package, then config package rely on registry package. Please refer to #2377.

But we found that it is difficult to resolve because of the existing of /common/extension module. If we change it, it will be the same as refactoring the whole dubbo-go. This is clearly not the amount of work that the Triple branch can handle.

To present to users the effect of layering and ensure the correctness of user-side API, we decide to take an ugly approach. For example, make a copy of config.RegistryConfig and put it to registry package. In the client module, we expose WithRegistries(registries map[string]*registry.RegistryConfig) to users. But client module would call compatRegsitryConfig to turn registry.RegistryConfig into config.RegistryConfig.

This is a temporary approach. When we decide to refactor dubbo-go, these compatible parts would be removed.

@sonarcloud
Copy link

sonarcloud bot commented Aug 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chickenlj chickenlj merged commit 2278939 into apache:feature-triple Aug 28, 2023
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants