Grails

Install-plugin fails if install plugin A with dependsOn = [B:'0.2 > *', C:'0.3 > *'] if A is loaded before B or C

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.2
  • Component/s: None
  • Labels:
    None

Description

The problem is they end up in the delayedPlugins list and then the version numbers are checked to finalize the dependencies, but it uses the old naive check that only checks for string equality on versions:

private boolean  isDependantOn(GrailsPlugin plugin, GrailsPlugin dependancy) {
      String[] dependencies = plugin.getDependencyNames();
      for (int i = 0; i < dependencies.length; i++) {
          String name = dependencies[i];
          String version = plugin.getDependentVersion(name);

          if(name.equals(dependancy.getName()) && version.equals(dependancy.getVersion()))
              return true;
      }
      return false;
  }

The " && version.equals(dependancy.getVersion())" is comparing apples and oranges i.e. "0.2 > *" and "0.3" in my case

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: