-
Notifications
You must be signed in to change notification settings - Fork 632
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
feat(dependencies): Add unit tests checking for circular dependencies and orphan modules #3360
Conversation
They seem mostly used.
Only We used to check circular dependency only in |
The original idea for this sort of thing occurred to me when I was reading through the style guide and specifically the mention of circular imports. @kt3k would it be helpful to keep a check like this with specific files/patterns excluded from the results to be explicit about what exceptions are being made and the opportunity to document them and why? I've updated the PR with additional patterns to "skip" using Just asking the questions to have to conversation. |
I didn't mean to close the PR; bad muscle memory. |
30c3832
to
28f4954
Compare
+1 @kalisjoshua, is there a particular issue you're experiencing due to circular dependencies? They're usually not problematic. |
No issue @iuioiua I was just trying to create awareness about a rule I saw in the style guide that I didn't see being enforced. I thought it might be helpful to have something checking something like these issues because it is hard for humans to do so reliably. If this isn't desired or needed that's fine but it might be a good idea to remove it from the style guide as a rule. |
I see. I think the solution here is modifying or removing the line in the style guide, as it suggests circular imports are problematic:
As Yoshiya said, circular imports needed to be avoided when the Node compatibility layer was part of the Standard Library. But this is no longer the case. |
How does |
Closing without merge as there seem no clear path forward. Thanks for your suggestion anyway |
Is there any interest in including a unit test for auditing the repository for circular dependency chains or orphan files? I added two files to illustrate the circular dependency feature; they aren't intended to stay (hopefully obvious).
There seem to be a lot (42) of files that aren't used as imports anywhere. Are these used somehow that isn't immediately obvious?
Are these features handled somewhere else? If so, no worries. I used this as a chance to learn a little more about the Deno ecosystem and publish my first module. I'm open to suggestions or improvements; including closing this PR for any reason.