Skip to content

fix(sdk): Fix circular dependency by removing redundant tsyringe setup import from PersistenceManager#3367

Merged
mondoreale merged 1 commit intomainfrom
fix-circular-deps
Jan 23, 2026
Merged

fix(sdk): Fix circular dependency by removing redundant tsyringe setup import from PersistenceManager#3367
mondoreale merged 1 commit intomainfrom
fix-circular-deps

Conversation

@mondoreale
Copy link
Copy Markdown
Contributor

Summary

Fix a circular dependency in the SDK by removing a redundant import './setupTsyringe' statement from PersistenceManager.ts.

The circular dependency chain was:

  1. PersistenceManager.ts imports setupTsyringe.ts
  2. setupTsyringe.ts imports Resends.ts (to register it with tsyringe)
  3. Resends.ts transitively depends on PersistenceManager through the dependency injection graph

Since setupTsyringe.ts is already imported at the application entry point (StreamrClient.ts), the import in PersistenceManager.ts was redundant and only served to create this circular reference.

Changes

  • Remove unnecessary import './setupTsyringe' from packages/sdk/src/PersistenceManager.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a circular dependency in the SDK by removing a redundant import './setupTsyringe' statement from PersistenceManager.ts. The circular dependency chain was: PersistenceManagersetupTsyringeResendsMessagePipelineFactoryGroupKeyManagerLocalGroupKeyStorePersistenceManager. Since setupTsyringe is already imported at the application entry point (StreamrClient.ts), this import was unnecessary.

Changes:

  • Removed redundant import './setupTsyringe' statement from PersistenceManager.ts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mondoreale mondoreale merged commit 77033ec into main Jan 23, 2026
29 checks passed
@mondoreale mondoreale deleted the fix-circular-deps branch January 23, 2026 11:53
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.

2 participants