Skip to content

fix(ruby): qualify root module constants - #17414

Draft
ngyna wants to merge 2 commits into
fern-api:mainfrom
ngyna:anguyen-fern-ruby-root-constants
Draft

fix(ruby): qualify root module constants#17414
ngyna wants to merge 2 commits into
fern-api:mainfrom
ngyna:anguyen-fern-ruby-root-constants

Conversation

@ngyna

@ngyna ngyna commented Aug 14, 2026

Copy link
Copy Markdown

Closes #17413. Generated Ruby SDKs now load when a service group has the same module name as the SDK root: runtime references resolve from Ruby's top-level namespace instead of being redirected through the nested service.

  • Make fully qualified Ruby AST references emit a leading ::, and use them for generated model, client, HTTP, error, environment, and request references.
  • Qualify the runtime templates and small set of generator strings that bypass the AST.
  • Add a generic Seed::Seed regression fixture that loads the gem and exercises root and nested clients, models, and enums.
  • Regenerate the Ruby v2 seed corpus with only the resulting root-qualification changes; unrelated pre-existing seed drift is excluded.

@nitpickybot nitpickybot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the changes — everything looks good. No issues found.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread generators/ruby-v2/base/src/asIs/internal/json/request.Template.rb
@ngyna
ngyna force-pushed the anguyen-fern-ruby-root-constants branch from a946363 to c527347 Compare August 14, 2026 05:05
@ngyna
ngyna marked this pull request as draft August 14, 2026 16:36
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.

Ruby SDK fails to load when a service matches the root module

1 participant