Repository navigation
cmd/mobyextgen: Use a distinctive mobyextcontract import alias - #9
Merged
Merged
Conversation
Contract packages whose names matched generated imports produced uncompilable adapters because both imports used the same alias. Go type identities and the protobuf wire format are unchanged. Signed-off-by: Paweł Gronowski <git@grono.dev>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The generator, tests, and generated outputs consistently apply the collision-resistant alias without changing API identities or wire behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Uses a stable, distinctive contract import alias to prevent generated Go adapters from having conflicting imports.
Changes:
- Generates all contract references with the
mobyextcontractalias. - Removes obsolete package-name tracking.
- Updates generated adapters and generator tests.
| File | Description |
|---|---|
cmd/mobyextgen/wire.go |
Uses the fixed contract alias. |
cmd/mobyextgen/parse.go |
Removes package-name capture while retaining package validation. |
cmd/mobyextgen/model.go |
Removes the unused package-name field. |
cmd/mobyextgen/generation_test.go |
Updates alias expectations. |
sdk/sdkapi/protogen/wire.gen.go |
Regenerates the SDK adapter. |
internal/launcher/echo/v1/protogen/wire.gen.go |
Regenerates the Echo adapter. |
example/greeter/v0/protogen/wire.gen.go |
Regenerates the Greeter adapter. |
Files not reviewed (4)
- cmd/mobyextgen/wire.go: Generated file
- example/greeter/v0/protogen/wire.gen.go: Generated file
- internal/launcher/echo/v1/protogen/wire.gen.go: Generated file
- sdk/sdkapi/protogen/wire.gen.go: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Contract packages whose names matched generated imports produced uncompilable adapters because both imports used the same alias.
Go type identities and the protobuf wire format are unchanged.