-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add in the basics for Import ordering #5524
base: main
Are you sure you want to change the base?
Conversation
This will walk AST for import notes, and build up a mapping of relationships tying in the target of the import (the "dependency") to our current program (the "dependent"). This allows us to build up a mapping of what dependency and reverse dependency relationships look like, in order to sort dependencies by topologically sorting them. Since I wanted to enable some parallelism here long-term, this returns the (kinda awkward) `Vec<Vec<String>>` type. This is a list of list of dependency targets which can safely be run concurrently, because they have no dependency relationship to eachother. Each list of dependencies should be gated, and start the next list of dependencies after the first is complely done. This isn't ideal and will change long-term, but for now this will work to enable very basic opportunistic parallelism.
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
this lint doesn't apply here, order doesn't matter. Elsewhere in this program where order does matter we do the intermediate vec.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5524 +/- ##
==========================================
+ Coverage 86.32% 86.37% +0.05%
==========================================
Files 95 96 +1
Lines 36020 36170 +150
==========================================
+ Hits 31093 31241 +148
- Misses 4927 4929 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This will walk AST for import notes, and build up a mapping of relationships tying in the target of the import (the "dependency") to our current program (the "dependent").
This allows us to build up a mapping of what dependency and reverse dependency relationships look like, in order to sort dependencies by topologically sorting them.
Since I wanted to enable some parallelism here long-term, this returns the (kinda awkward)
Vec<Vec<String>>
type.This is a list of list of required AST files which can safely be run concurrently, because they have no dependency relationship to eachother. Each list of dependencies should be fenced, and start the next list of dependencies after the first is complely done. This isn't ideal and will change long-term, but for now this will work to enable very basic opportunistic parallelism.