-
Notifications
You must be signed in to change notification settings - Fork 380
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: enforce that Algebra.Notation imports no other files inside algebra #22725
base: master
Are you sure you want to change the base?
Conversation
inside Algebra by extending the broadImports check of the header linter accordingly.
PR summary a01470fa27Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit> The doc-module for No changes to technical debt.You can run this locally as
|
About the review requests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this prevent also transitive importing? That is, a direct import will get flagged, but what if there is no direct import, but there is a transitive one?
I wonder whether this should be regulated by an extension of the assert_not_imported
machinery that is directory-aware.
!bench |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
maintainer delegate
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
Here are the benchmark results for commit f982972. |
|
Co-authored-by: Yaël Dillies <[email protected]>
Very good question! This only lints direct imports. I agree transitive imports should also be caught. If you have a pointer to how to extend assert_not_imported, I'm happy to try. (This is not my highest priority though, so might take some time.) In the mean-time, we could land this with an issue about the generalisation - or wait for the better fix instead. Either way is fine with me. |
What if, instead of checking that there is an This check should only run on the appropriate set of modules, so that, on most files, just the prefix check on the name will run. |
That's a great idea, thanks! |
by extending the broadImports check of the header linter accordingly.
This enforces some of the rules set in #22640.