You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by GitBox <gi...@apache.org> on 2022/11/13 11:06:13 UTC

[GitHub] [cayenne] andrus opened a new pull request, #535: CAY-2774 Overriding service ordering in DI List causes DIRuntimeExcep…

andrus opened a new pull request, #535:
URL: https://github.com/apache/cayenne/pull/535

   @stariy95 could you please review?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cayenne.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cayenne] asfgit closed pull request #535: CAY-2774 Overriding service ordering in DI List causes DIRuntimeExcep…

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #535: CAY-2774 Overriding service ordering in DI List causes DIRuntimeExcep…
URL: https://github.com/apache/cayenne/pull/535


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cayenne.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cayenne] stariy95 commented on a diff in pull request #535: CAY-2774 Overriding service ordering in DI List causes DIRuntimeExcep…

Posted by GitBox <gi...@apache.org>.
stariy95 commented on code in PR #535:
URL: https://github.com/apache/cayenne/pull/535#discussion_r1021447579


##########
cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java:
##########
@@ -68,6 +68,7 @@ public void addAll(Collection<V> vertexes) {
 	public void add(V from, V to) {
 		this.add(from);
 		this.add(to);
+		neighbors.get(to).remove(from);

Review Comment:
   This change breaks Module providers circular dependency check, see `ModuleLoader.loadModules()`. An easy fix could be just add option to the `DIGraph` and use different logic in List creation and in modules loading parts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cayenne.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cayenne] stariy95 commented on a diff in pull request #535: CAY-2774 Overriding service ordering in DI List causes DIRuntimeExcep…

Posted by GitBox <gi...@apache.org>.
stariy95 commented on code in PR #535:
URL: https://github.com/apache/cayenne/pull/535#discussion_r1021447579


##########
cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java:
##########
@@ -68,6 +68,7 @@ public void addAll(Collection<V> vertexes) {
 	public void add(V from, V to) {
 		this.add(from);
 		this.add(to);
+		neighbors.get(to).remove(from);

Review Comment:
   This change breaks Module providers circular dependency check, see `ModuleLoader.loadModules()`. An easy fix could be just add option to the `DIGraph` use different logic in List creation and in modules loading.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cayenne.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cayenne] stariy95 commented on a diff in pull request #535: CAY-2774 Overriding service ordering in DI List causes DIRuntimeExcep…

Posted by GitBox <gi...@apache.org>.
stariy95 commented on code in PR #535:
URL: https://github.com/apache/cayenne/pull/535#discussion_r1021457969


##########
cayenne-di/src/main/java/org/apache/cayenne/di/spi/DIGraph.java:
##########
@@ -68,6 +68,7 @@ public void addAll(Collection<V> vertexes) {
 	public void add(V from, V to) {
 		this.add(from);
 		this.add(to);
+		neighbors.get(to).remove(from);

Review Comment:
   Added test case for that: https://github.com/apache/cayenne/blob/master/cayenne-di/src/test/java/org/apache/cayenne/di/spi/ModuleLoaderTest.java#L64



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cayenne.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org