Skip to content

Bump dependencies and fix proxy generator circular imports#2201

Merged
einari merged 2 commits into
mainfrom
chore/bump-dependencies-and-fix-proxy-circular-imports
May 12, 2026
Merged

Bump dependencies and fix proxy generator circular imports#2201
einari merged 2 commits into
mainfrom
chore/bump-dependencies-and-fix-proxy-circular-imports

Conversation

@einari
Copy link
Copy Markdown
Contributor

@einari einari commented May 12, 2026

Fixed

  • Proxy generator no longer emits a derivatives import list on property descriptors, eliminating circular imports when subtypes extend the parent type being generated. The @derivedType decorator handles subtype registration at decoration time, making the explicit list unnecessary.

Changed

  • Cratis.Chronicle* 15.22.13 → 15.25.5
  • MongoDB.Driver 3.8.0 → 3.8.1
  • SharpCompress 0.48.0 → 1.0.0
  • Meziantou.Analyzer 3.0.70 → 3.0.78
  • Microsoft.ClearScript.V8* 7.5.0 → 7.5.1
  • @cratis/fundamentals ^7.7.3 → ^7.9.2

einari added 2 commits May 12, 2026 05:22
- Cratis.Chronicle* 15.22.13 → 15.25.5
- MongoDB.Driver 3.8.0 → 3.8.1
- SharpCompress 0.48.0 → 1.0.0
- Meziantou.Analyzer 3.0.70 → 3.0.78
- Microsoft.ClearScript.V8* 7.5.0 → 7.5.1
- @cratis/fundamentals ^7.7.3 → ^7.9.2
The previous approach emitted a derivatives list on each property descriptor
and then tried to filter out types that were subtypes of the type being
generated. This was fragile — it required post-processing the list and still
left open edge cases.

The correct fix is simpler: do not emit derivatives at all. The TypeScript
@derivedType decorator registers each subtype with all its ancestors at
decoration time, so JsonSerializer discovers subtypes via
DerivedType.getDerivedTypesFor() without any explicit import list. Emitting
derivatives would force the parent type to import each subtype, which creates
circular dependencies whenever those subtypes extend the parent.
@einari einari added the patch label May 12, 2026
@einari einari merged commit 36b370b into main May 12, 2026
7 of 8 checks passed
@einari einari deleted the chore/bump-dependencies-and-fix-proxy-circular-imports branch May 12, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant