Skip to content

cmd/mobyextgen: Use a distinctive mobyextcontract import alias - #9

Merged
thaJeztah merged 1 commit into
moby:masterfrom
vvoland:deconflict
Oct 7, 2026
Merged

thaJeztah merged 1 commit into
moby:masterfrom
vvoland:deconflict

Conversation

@vvoland

@vvoland vvoland commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

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.

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>
@vvoland vvoland self-assigned this Oct 1, 2026
@vvoland
vvoland requested a balanced review from Copilot October 1, 2026 11:14

Copilot AI 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.

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 mobyextcontract alias.
  • 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.

@vvoland
vvoland requested a review from thaJeztah October 7, 2026 10:28

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
thaJeztah merged commit 80fab72 into moby:master Oct 7, 2026
5 checks passed
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.

3 participants