-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable aliased received properties to be received again further down the chain #23
Conversation
return $0.fulfillingProperty ?? $0.property | ||
$0.fulfillingProperty ?? $0.property | ||
case .forwarded, | ||
.instantiated: | ||
return nil | ||
nil |
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 is a style change. not related to the underlying fix here
// If the dependency has a fulfilling property, the property has been aliased. | ||
|| $0.fulfillingProperty != nil |
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 matches similar code that we have over in the ScopeGenerator:
SafeDI/Sources/SafeDICore/Generators/ScopeGenerator.swift
Lines 55 to 58 in e1d20ca
// If the source is not received, the property is being made available. | |
$0.source != .received | |
// If the dependency has a fulfilling property, the property is being aliased. | |
|| $0.fulfillingProperty != nil |
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.
To be honest the more I think about this (and the PR built on top of this one)... the more I think the abstraction here is wrong. This change works and is mergeable, however I may take a bigger pass at cleaning this up before the next PR makes it out of draft.
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.
Yeah alright pushed up something way better in #24.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
==========================================
+ Coverage 99.25% 99.28% +0.03%
==========================================
Files 37 37
Lines 8149 8304 +155
==========================================
+ Hits 8088 8245 +157
+ Misses 61 59 -2
|
Closing in favor of #26 |
Once we renamed a property, we were not able to receive that renamed property further down the chain.