-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improve + consolidate cycle detection #100
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #100 +/- ##
==========================================
+ Coverage 99.63% 99.67% +0.03%
==========================================
Files 47 47
Lines 11519 11557 +38
==========================================
+ Hits 11477 11519 +42
+ Misses 42 38 -4
|
.union(scope.properties), | ||
property: property, | ||
.union(scope.properties) | ||
.removing(childProperty), |
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.
brought this line back from #95. Now that we're doing our cycle checking before we're doing our "initialized in chain" checking, we can make this more semantically correct
@@ -351,58 +351,43 @@ actor ScopeGenerator: CustomStringConvertible, Sendable { | |||
private var generateCodeTask: Task<String, Error>? | |||
|
|||
private var orderedPropertiesToGenerate: [ScopeGenerator] { | |||
get throws { |
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.
we no longer need to throw
here since we do this checking much earlier now. best reviewed with whitespace turned off
Dependency received in same chain it is instantiated! | ||
@Instantiated a: A -> @Received renamedB: B -> @Received c: C -> @Received a: A |
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.
this test better mirrors the above test. I liked the parallelism
Builds on top of #95 by fully consolidating our cycle detection + further improving the error message we emit when receiving a property that isn't yet fully instantiated.