jdaugherty commented on code in PR #15995:
URL: https://github.com/apache/grails-core/pull/15995#discussion_r3606020475


##########
grails-core/src/main/groovy/org/apache/grails/core/plugins/DefaultPluginDiscovery.java:
##########
@@ -418,16 +418,36 @@ private void loadDelayedPlugins() {
                     delayedLoadPlugins.add(plugin);
                 } else {
                     failedPlugins.put(plugin.getName(), plugin);
-                    LOG.error(
-                            "ERROR: Plugin [{}] cannot be loaded because its 
dependencies [{}}] cannot be resolved",
-                            plugin.getName(),
-                            plugin.getDependsOnNames()
-                    );
+                    logUnresolvedDependencies(plugin);
                 }
             }
         }
     }
 
+    private void logUnresolvedDependencies(PluginInfo plugin) {
+        var unresolvedDependencies = new ArrayList<String>();
+        for (var name : plugin.getDependsOnNames()) {
+            var requiredVersion = 
plugin.getMetadata().getDependentVersion(name);
+            var dependency = findPlugin(name);
+            if (dependency == null) {
+                unresolvedDependencies.add(
+                        "dependency [" + name + "] with required version [" + 
requiredVersion + "] is missing"
+                );
+            } else if 
(!GrailsVersionUtils.isValidVersion(dependency.getPluginVersion(), 
requiredVersion)) {
+                unresolvedDependencies.add(
+                        "dependency [" + name + "] has version [" + 
dependency.getPluginVersion() +
+                                "] but requires [" + requiredVersion + "]"
+                );
+            }
+        }
+        LOG.warn(

Review Comment:
   I disagree on this being a warning, there is a legitimate configuration 
issue.  This should be an error message



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to