Skip to content

deps: switch shared types to common#3

Merged
TeoSlayer merged 1 commit into
mainfrom
migrate-to-common
May 28, 2026
Merged

deps: switch shared types to common#3
TeoSlayer merged 1 commit into
mainfrom
migrate-to-common

Conversation

@TeoSlayer
Copy link
Copy Markdown
Contributor

Summary

Mechanical migration: every github.com/TeoSlayer/pilotprotocol/pkg/{coreapi,protocol,driver,registry/{client,wire},config,logging,urlvalidate,secure} import (and the previously-internal ipcutil) is rewritten to use the canonical github.com/pilot-protocol/common/<pkg> module.

This is Phase 2 of the common-extraction migration. See pilot-protocol/common PR for Phase 1 (the actual package moves) and TeoSlayer/pilotprotocol PR for Phase 3 (web4 cleanup + duplicate deletion).

Why

Today every sibling repo requires the TeoSlayer/pilotprotocol hub for shared types. The hub in turn requires every sibling for its cmd/daemon assembly. That's a locally-circular dep that only works because every repo has replace ... => ../web4 for dev. At release time it forces coordinated tagging on every sibling+hub edit.

Moving the shared types into common breaks that cycle for the 13 leaf siblings (everything except handshake/runtime/libpilot which extend the daemon engine and stay tightly coupled to pkg/daemon).

What's in this PR

  • Sed sweep across every .go file replacing 10 import paths.
  • Adds replace github.com/pilot-protocol/common => ../common so local dev resolves against the local common checkout.
  • go mod tidy clean.
  • go build ./... passes.

Merge order

This PR depends on the common-side PR (Phase 1) landing first so the new module paths actually resolve at the common@vX.X.X tag. Until then, local replace keeps everything working.

🤖 Generated with Claude Code

Mechanical sed sweep replacing every
github.com/TeoSlayer/pilotprotocol/pkg/{coreapi,protocol,driver,registry/client,registry/wire,config,logging,urlvalidate,secure}
and github.com/TeoSlayer/pilotprotocol/internal/ipcutil
with the equivalent github.com/pilot-protocol/common/<pkg>.

Adds a local replace directive so dev still resolves against the
local common checkout. The hub require for TeoSlayer/pilotprotocol
remains for now (handshake/runtime/libpilot keep their pkg/daemon
import; the rest will be cleaned up when web4 itself migrates in
Phase 3 — see common/extract-shared-types-from-web4 branch).

go build ./... passes.
@TeoSlayer TeoSlayer merged commit dae7451 into main May 28, 2026
3 of 4 checks passed
TeoSlayer added a commit that referenced this pull request May 29, 2026
…ce path (#4)

PR #3 ("deps: switch shared types from web4 hub to common") added
`github.com/pilot-protocol/common` as an examples/go dependency with a
`replace .. => ../../common` directive, but didn't update the CI workflow
to actually check that sibling repo out. Result: every main CI run since
#3 (2026-05-28T23:06) has failed at `go mod tidy` with:

  go: github.com/pilot-protocol/examples/go/client imports
      github.com/pilot-protocol/common/driver:
      github.com/pilot-protocol/common@v0.1.0: replacement directory
      ../../common does not exist

Verified locally by reproducing the CI layout (examples + web4 + common
checked out as siblings): tidy, build, and test all green.

Closes PILOT-349.

Co-authored-by: Teodor Calin <teodor@vulturelabs.io>
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.

2 participants