question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Two circular dependencies

See original GitHub issue

Not that they are bad, but they smell like possible o crap mistakes.

run-context.ts imports command.ts and vice versa. It’s via a function, but still not immune.

Also a more complex circular dependency: run-context.ts -> plugin.ts -> extensions.ts -> run-context.ts

It’s worth checking if we can properly structure the code so there could be no chance of a circular dependency.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
skellockcommented, Feb 6, 2018

The relationship from Command to RunContext is interface only, not data, so it wouldn’t cause any runtime issues like serialization problems.

Same with the plugin/extension gauntlet. Ownership is only 1 way, even though the interfaces are in both spots.

I love how TypeScript knows what to do.

0reactions
jamonholmgrencommented, Feb 6, 2018

I’m going to call this one wontfix … but feel free to bring it up again if we run into any issues!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Circular dependency - Wikipedia
In software engineering, a circular dependency is a relation between two or more modules which either directly or indirectly depend on each other...
Read more >
How to Analyze Circular Dependencies in ES6? - Railsware
According to Wikipedia, In software engineering, a circular dependency is a relation between two or more modules which either directly or ...
Read more >
How to Eliminate Circular Dependencies from Your JavaScript ...
Circular dependencies (also known as cyclic dependencies) occur when two or more modules reference each other.
Read more >
Circular Dependencies in Spring - Baeldung
A quick writeup on dealing with circular dependencies in Spring: how they occur and several ways to work around them.
Read more >
The vicious cycle of circular dependencies in microservices
A circular dependency is defined as a relationship between two or more application modules that are codependent. Circular dependencies in a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found