Problem
When a generated Ruby SDK has the same name for its root module and a service group (for example, Seed::Seed), runtime references such as Seed::Internal inside the nested service are resolved lexically as Seed::Seed::Internal. Loading the gem then raises NameError even though Seed::Internal exists at the top level.
This affects generated models, clients, HTTP helpers, and runtime templates that refer to root-module constants without a leading ::.
Expected behavior
Generated references to constants rooted at the SDK module should be absolute (for example, ::Seed::Internal) so Ruby does not redirect them through a same-named nested module. Public module and class names should remain unchanged.
Reproduction
Generate a Ruby SDK whose organization/root module is Seed and whose tagged service is also Seed, then require the gem and instantiate the root client. The load currently fails while resolving nested runtime constants.
Problem
When a generated Ruby SDK has the same name for its root module and a service group (for example,
Seed::Seed), runtime references such asSeed::Internalinside the nested service are resolved lexically asSeed::Seed::Internal. Loading the gem then raisesNameErroreven thoughSeed::Internalexists at the top level.This affects generated models, clients, HTTP helpers, and runtime templates that refer to root-module constants without a leading
::.Expected behavior
Generated references to constants rooted at the SDK module should be absolute (for example,
::Seed::Internal) so Ruby does not redirect them through a same-named nested module. Public module and class names should remain unchanged.Reproduction
Generate a Ruby SDK whose organization/root module is
Seedand whose tagged service is alsoSeed, thenrequirethe gem and instantiate the root client. The load currently fails while resolving nested runtime constants.