Skip to content

fix: throw StateError on circular dependency detection#6

Merged
mark-dropbear merged 1 commit into
mainfrom
issue/5
Jul 15, 2026
Merged

fix: throw StateError on circular dependency detection#6
mark-dropbear merged 1 commit into
mainfrom
issue/5

Conversation

@mark-dropbear

Copy link
Copy Markdown
Contributor

Modify InjectorGraphResolver to accumulate detected circular dependencies and throw a descriptive StateError to immediately fail the build. Previously, cycles were only logged to a detached Logger instance, which remained hidden from stdout and allowed the builder to silently succeed while emitting invalid recursive code that stack-overflowed at runtime.

  • Throws StateError on dependency cycles during graph resolution.
  • Updates unit tests to assert cycle failures.
  • Bumps inject_compile_generator version to 0.9.2 and updates the changelog.

Closes #5

Modify `InjectorGraphResolver` to accumulate detected circular dependencies
and throw a descriptive `StateError` to immediately fail the build.
Previously, cycles were only logged to a detached `Logger` instance, which
remained hidden from stdout and allowed the builder to silently succeed
while emitting invalid recursive code that stack-overflowed at runtime.

- Throws `StateError` on dependency cycles during graph resolution.
- Updates unit tests to assert cycle failures.
- Bumps `inject_compile_generator` version to `0.9.2` and updates the changelog.

Closes #5
@mark-dropbear
mark-dropbear merged commit 73579dc into main Jul 15, 2026
1 check passed
@mark-dropbear
mark-dropbear deleted the issue/5 branch July 15, 2026 16:45
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.

Circular dependency detection does not fail the build and silently generates stack-overflowing code

1 participant