Skip to content

[BUG] Cyclic Versioning of phenix/types/versions/v* #247

@nblair2

Description

@nblair2

Bug Report

Description

Currently, the phenix/types/version/v1 package imports phenix/types/version/v2, which means v2 cannot import anything from v1 without creating an import cycle.

Additional Context

I was adding a new TopologySpec to v2 and wanted to reuse the existing v1 Node struct, but that introduces a cyclic import. A few paths forward:

  • Create an internal domain model and use adapters between each versioned spec and the domain model. More work up front, but clean and future‑proof.
  • Keep versions consistent across all types (introduce v2 equivalents for any reused v1 types) to avoid cross‑version imports. Easier short term, but leads to duplication.
  • Implement the changes in v1 topology if they are backward‑compatible, deferring a proper refactor.

Checklist

  • I have included no proprietary/sensitive information in

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions