Copilot commented on code in PR #3448:
URL: https://github.com/apache/dubbo-go/pull/3448#discussion_r3443004404


##########
options.go:
##########
@@ -105,7 +105,6 @@ func (rc *InstanceOptions) init(opts ...InstanceOption) 
error {
        if err := rc.finalizeGlobalOptionsWithRuntimeActivation(true); err != 
nil {
                return err
        }
-       setCompatRootConfig(compatRootConfig(rc))
 
        if err := rc.initMetadataReport(); err != nil {

Review Comment:
   Removing the call to `setCompatRootConfig(compatRootConfig(rc))` means 
`dubbo.NewInstance(...)` no longer populates the legacy `config.RootConfig`. 
There are still in-repo tests relying on the previous behavior (notably 
`config/compat_test.go`, which asserts `config.GetRootConfig()` mirrors 
`InstanceOptions` after `dubbo.NewInstance`), so this change will currently 
break `go test ./...`.
   
   If the compatibility bridge is intentionally being removed (per #3396), 
please update/remove the remaining compat tests and any remaining call sites 
that assume `NewInstance` updates `config.RootConfig`. If not intentional, 
consider keeping a transitional opt-in hook instead of silently changing 
behavior.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to