-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Materialization/resolution inconsistency.
If the alias is included into a super component, while another dependent alias is included into a sub, and the string representation of a list-binding is queried, which involves resolving the second alias in the sub - crash! This CL fixes long existing graph building inconsistency - if an alias is included from the super-component, binding materialization continues locally after the alias resolution, not in the parent. (cherry picked from commit 887fd3c)
- Loading branch information
Fedor Ihnatkevich
committed
Sep 28, 2023
1 parent
13010c7
commit c140c30
Showing
4 changed files
with
201 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...t/resources/golden/CoreBindingsFailureTest/alias-in-super-alias-in-sub-bug-54-.golden.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error: Missing binding for test.Api2 | ||
NOTE: No known way to infer the binding | ||
Encountered: | ||
in graph for root-component test.MyRootComponent | ||
in graph for component test.MySubComponent | ||
in entry-point getObjects: java.util.List<java.lang.Object> | ||
^-[*1]-------------------------- | ||
in [1*] list-binding List { multi-binding-contributor java.lang.Object, } assembled in graph for component test.MySubComponent | ||
^-[*2]------------------------------------ | ||
in [2*] alias test.MySubModule::objects2(test.Api1Consumer) | ||
^-[*3]----------- | ||
in [3*] inject-constructor test.Api1Consumer(test.Api1) | ||
^-[*4]--- | ||
in [4*] alias test.MyRootModule::api(test.Api1Impl) | ||
^-[*5]------- | ||
in [5*] inject-constructor test.Api1Impl(test.Api2) | ||
^-[*6]--- | ||
here: [6*] <missing> | ||
^~~~~~~~~ |
Oops, something went wrong.