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

tach check with circular dependencies should emit more details #476

Open
miketheman opened this issue Dec 15, 2024 · 1 comment
Open

tach check with circular dependencies should emit more details #476

miketheman opened this issue Dec 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@miketheman
Copy link

miketheman commented Dec 15, 2024

With the configuration forbid_circular_dependencies = true, running tach check on a codebase that has circular imports may emit something like the following:

$ tach check
❌ Circular dependency detected for module 'foo.models'
❌ Circular dependency detected for module 'foo.utils'
❌ Circular dependency detected for module 'foo.tasks'

But doesn't provide much more beyond that.

It would be better to add a --verbose or --debug flag to this check to emit more details as to what cycle was found, how many steps, and generally provide more context to the reader on how to resolve.

@emdoyle
Copy link
Member

emdoyle commented Dec 16, 2024

This is due to performance concerns IIRC. The check stops at the first cycle, and I'm not sure if the current algorithm will have path information.

This can definitely be improved though, especially for smaller projects. Will look back into this.

@emdoyle emdoyle added the enhancement New feature or request label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants