fix(go): normalize Go package name for dynamic snippet IR generation#14754
Merged
iamnamananand996 merged 1 commit intomainfrom Apr 8, 2026
Merged
Conversation
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:
|
Contributor
🌱 Seed Test SelectorSelect languages to run seed tests for:
How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR. |
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.
jsklan
approved these changes
Apr 8, 2026
3 tasks
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
Fixes Go dynamic snippets not being generated during
fern docs publish, causing docs sites to fall back to rawnet/httpHTTP snippets instead of SDK-idiomatic Go code.Root Cause
In
generateLanguageSpecificDynamicIRs, the snippet configuration's Go package name is normalized vianormalizeGoPackageForLookup()(stripping thehttps://prefix), but thepackageNameextracted from the generator's output config (repoUrl) retains thehttps://prefix. The strict equality check (===) always fails for Go, so the dynamic IR is never generated and never uploaded to FDR.snippetConfiguration.go→github.com/owner/repo(normalized)packageName(from generator config) →https://github.com/owner/repo(not normalized)Changes Made
packageNamewithnormalizeGoPackageForLookup()before the comparison, matching howsnippetConfiguration.gois already normalizedTesting
pnpm run check)Review Checklist
publishDocs.tssnippetConfiguration.swiftcomes fromsnippetsConfig.swiftSdk?.package(not normalized), while Swift'spackageNamealso comes fromrepoUrl(withhttps://). IfswiftSdk.packagecan be a GitHub URL, Swift would have the same mismatch.Link to Devin session: https://app.devin.ai/sessions/97992dbbc8c7438bbdf2c381765313d1
Requested by: @iamnamananand996