Skip to content
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

[IDEA] Allow plugins to specify maven style version requirements for mirth server version #5672

Open
tonygermano opened this issue Feb 11, 2023 · 0 comments
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-10085 triaged

Comments

@tonygermano
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Plugins that require no changes upon a new mirth release still need to be updated because they must explicitly state in the plugin.xml the new mirth version number.

Describe your use case
I would like a single release of my plugin to support past, current, and future versions of mirth as long as no breaking changes have been introduced on the server.

Describe the solution you'd like
Plugins must contain an xml serialized version of an instance of the MetaData class, which has a String property named mirthVersion. The open source plugins in this repository always have a value in this field which exactly matches the server version. However, it is currently supported to have a comma separated list of versions as well.

It would be useful to list versions in the same manner as library dependencies in a maven pom file as described here. In addition to lists of versions, it supports both closed and open-ended ranges with holes.

I believe this method is the only one that would need to be changed to accommodate this.

public boolean isExtensionCompatible(MetaData metaData) {
String serverMirthVersion;
try {
serverMirthVersion = getServerVersion();
} catch (Exception e) {
logger.error("An error occurred while attempting to determine the current server version.", e);
return false;
}
String[] extensionMirthVersions = metaData.getMirthVersion().split(",");
logger.debug("checking extension \"" + metaData.getName() + "\" version compatability: versions=" + ArrayUtils.toString(extensionMirthVersions) + ", server=" + serverMirthVersion);
// if there is no build version, just use the patch version
if (serverMirthVersion.split("\\.").length == 4) {
serverMirthVersion = serverMirthVersion.substring(0, serverMirthVersion.lastIndexOf('.'));
}
for (int i = 0; i < extensionMirthVersions.length; i++) {
if (extensionMirthVersions[i].trim().equals(serverMirthVersion)) {
return true;
}
}
return false;
}

Describe alternatives you've considered

  • Putting out a new plugin version after every mirth release
  • Guessing at future mirth server version numbers and including them before they come out.

Additional context
If issue #4869 were resolved in mirth 4.3.0, a ServicePlugin known to work in version 3.4.0 and still does not require any other changes to run could specify the mirthVersion as [3.4.0,3.9.0),[4.3.0,) and support all of those and future versions with a single release. If an improvement is made to the plugin which still supports all of those versions, it only require a single new release to make the new features available in older mirth versions. For a plugin in maintenance mode, the plugin will not need a new release until mirth puts out a change that breaks it.

This request is closely related to #4988

@tonygermano tonygermano added the enhancement New feature or request label Feb 11, 2023
@lmillergithub lmillergithub added triaged Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-10085 labels Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-10085 triaged
Projects
None yet
Development

No branches or pull requests

2 participants