Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight circular dependencies in graph #121

Open
3 tasks done
timoxley opened this issue Oct 2, 2024 · 2 comments
Open
3 tasks done

Highlight circular dependencies in graph #121

timoxley opened this issue Oct 2, 2024 · 2 comments
Labels
enhancement New feature or request pr welcome

Comments

@timoxley
Copy link

timoxley commented Oct 2, 2024

Clear and concise description of the problem

Sometimes I get runtime errors that appear due to (indirect) circular dependencies. Often the stack trace isn't particularly useful at tracking down what led to the circular dependency. It would be great if I could more clearly visualize dependency chains in the inspector graph.

Suggested solution

Use different colours to highlight indirect and direct circular dependencies in the inspector graph when a node is selected.
Perhaps it could also use different colours for type imports vs concrete imports if that's easy to detect.

Ideally incoming and outgoing dependencies would also use different colours and there would be a more clear differentiation between the selected node's edges and unrelated edges, currently there is some difference, the lines get thicker, but I find it a bit too subtle.

Alternative

Log circular dependency chains in the output somewhere.

Additional context

No response

Validations

@timoxley timoxley added the enhancement New feature or request label Oct 2, 2024
@antfu
Copy link
Member

antfu commented Oct 4, 2024

That would be great, would you be interested in helping out?

@timoxley
Copy link
Author

timoxley commented Oct 4, 2024

That would be great, would you be interested in helping out?

@antfu yes, I did have a poke around to see if it was trivial, but I didn't see an immediately obvious way to plug this in. How would you make this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr welcome
Projects
None yet
Development

No branches or pull requests

2 participants