fix(go): ensure extraDependencies overrides take precedence over bundled deps#14587
Merged
fix(go): ensure extraDependencies overrides take precedence over bundled deps#14587
Conversation
…f replacing them Co-Authored-By: judah <jsklan.development@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
ruby-sdk was replaced by ruby-sdk-v2 in PR #14585 but the validate-all-changelogs.sh script still referenced the old name, causing the Validate Changelogs CI check to fail for all PRs touching generators/**/versions.yml. Co-Authored-By: judah <jsklan.development@gmail.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
fern-support
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Refs FER-9453
The Go v1 generator's
module.importsconfig (the Go equivalent ofextraDependencies) could not override bundled dependency versions. When a user specifiedmodule.imports, the entire default import set was replaced instead of merged, causing all unspecified defaults (uuid, testify, yaml) to be silently dropped.The v2 generator (TypeScript) already handled this correctly via object spread (
{...defaults, ...userImports}). This PR aligns v1 behavior with v2.Changes Made
generators/go/internal/cmd/cmd.go: ChangedmoduleConfigFromCustomConfigto merge user-specified imports on top ofdefaultImportsinstead of replacing them. Default deps are copied first, then user entries are applied, so user versions override matching keys while preserving the rest.generators/go/sdk/versions.yml: Added changelog entry (v1.33.1).scripts/validate-all-changelogs.sh: Removed staleruby-sdkentry that was causing the "Validate Changelogs" CI check to fail.ruby-sdkwas replaced byruby-sdk-v2in chore(ruby): update get-test-matrix to reference ruby-sdk-v2 #14585 but this script was not updated, breaking changelog validation for all PRs touchinggenerators/**/versions.yml.Key Review Points
module.importswould discard all defaults. Now defaults are always included as a base. If any user relied on the old behavior to intentionally exclude a default dep, they would now get it back. This seems like the correct trade-off — and matches how v2 already works.customConfig.Module.Importsmap in Go is a safe no-op, so no nil guard is needed.go.modanyway, so this fix primarily impacts model-only generation in v1.Human Review Checklist
cmd.go: defaults are written first, then user imports overwrite — confirm this gives user values precedence (not the reverse)ruby-sdkfromvalidate-all-changelogs.shis correct given theruby-sdk→ruby-sdk-v2migration in chore(ruby): update get-test-matrix to reference ruby-sdk-v2 #14585module.importsTesting
go build ./...passesgo test ./...passesinternal/cmdhas no test infrastructure; relies on seed snapshot tests for regression coverageLink to Devin session: https://app.devin.ai/sessions/0f8b8b4bcb8c4289828129dc6c59feb5
Requested by: @jsklan