Skip to content

refactor(deps): repoint the core imports at the new layout - #189

Closed
LKSNDRTMLKV wants to merge 1 commit into
fix/access-filter-path-awarefrom
refactor/repoint-core-layout
Closed

LKSNDRTMLKV wants to merge 1 commit into
fix/access-filter-path-awarefrom
refactor/repoint-core-layout

Conversation

@LKSNDRTMLKV

Copy link
Copy Markdown
Member

Repoints every dpp_domain:: import at the module layout dpp-core adopts when it dissolves its domain bucket. Imports only — no behaviour is touched anywhere in this diff.

Blocked, deliberately

CI cannot be green until the core change is released. This builds against unreleased dpp-core; the pinned 0.18.0 in [workspace.dependencies] still has the old paths. Draft until the release lands, then repin and un-draft.

Locally, against the sibling checkout at the core branch head:

  • cargo check --workspace --all-targets --all-features — clean
  • cargo clippy --workspace --all-targets --all-features -- -D warnings — clean

Tests were not run: the Docker tiers need PostgreSQL, Redis and NATS. This is a compiles-and-lints result, not a green suite.

Stacked

Based on fix/access-filter-path-aware, not mainmain is still written against published 0.18.0 and would absorb the product-group rename and the layout move in one go. Retarget this to main before the parent merges; a deleted base closes the child irreversibly.

The mapping

The general case is that a module kept its name and rose one level, so dpp_domain::domain::error::DppError is dpp_domain::error::DppError. Five paths changed by more than that, and two of them are worth knowing because the obvious rewrite gets them wrong:

Was Is
domain::<x> <x> — the general case
domain::gtin, domain::commodity_code identifier::gtin, identifier::commodity_code
domain::gtin::gs1_check_digit dpp_domain::gs1_check_digitnot under identifier::gtin; check_digit is private
domain::product_identity product
domain::identity split into credential and disclosure
ports::seal::Seal* (values) seal::Seal*SealPort and GhostSeal stay put
ports::compliance::Compliance{Result,Status,Finding,Error,ErrorKind} compliance::…ComplianceRegistry and ComplianceStrategy stay put
ports::compliance::passthrough_registry passthrough — left ports entirely
ports::identity_port, ports::plugin_host_port ports::identity, ports::plugin_host

Both awkward cases fail loudly at compile time, which is the argument for taking the break rather than shipping compatibility re-exports upstream.

What this measured on the way through

143 files name dpp_domain. 108 broke; 35 did not — and every one of the 35 already imported from the crate root rather than reaching through dpp_domain::domain::…. Where core re-exports a name at its root, this change uses that path, so those files are insulated from the next internal move too.

That is worth acting on upstream: the root re-exports most of the model but stop short of the boundary. ArchivePort and RegistrySyncPort are at the root; SealPort, IdentityPort, PluginHost, PassportRepository, SealedEnvelope, VersionedSchemaRegistry, LensRegistry, PassportRef and filter_by_audience are not — so one adapter file writes both idioms for the same job. Re-exporting the whole boundary would make the next reorganisation cost this repository nothing.

Four crates and the CLI never name dpp_domain at all: dpp-identity, dpp-common, dpp-factor-data, and cli. dpp-resolver names it in three files, all root imports, all untouched.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@LKSNDRTMLKV LKSNDRTMLKV added the blocked Cannot proceed until a named dependency resolves: an EU act, an upstream release, or a decision label Aug 26, 2026
@LKSNDRTMLKV

Copy link
Copy Markdown
Member Author

Superseded by #198, which landed the core 0.19.0 adaptation as one unit. This PR's commits are in main via that merge (c1ee4c0).

The stack could not be landed incrementally: main could not compile against core 0.19.0 at all, and the lower branches imported dpp_domain::domain::product_group — the old module path with the new type name, a combination that existed only between core's rename and its layout dissolution and was never published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Cannot proceed until a named dependency resolves: an EU act, an upstream release, or a decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant