Modules put a requires version of the platform. This method was created for such. it usually means the lowest required version. So if a module requires version 1.9.8, it should then be able to run on version 2.1.0
should it? 2.1.0 can have backwards incompatible changes making a 1.9.8 module unable to run on 2.1.0.
But apart from that why is assertFalse(ModuleUtil.matchRequiredVersions("2.1.0", "1.9.*")); expression true then and β1.9.8β its not? Seems inconsistent to me
@teleivo that is simply the minimum required version. It does not necessarily mean that it will run on all higher versions. If the module developer wants to specify an upper boundary, it is all up to them.
From what I understood, @Dengfeng Li proposes that the single version of each module within the openmrs installation should match that of the main software ,else an error would be thrown .If so then this would mean that the single required version of each module would have to updated with each new build. This in my opinion would not be very feasible each time. Even if a single version is below the openmrs version then the build fails. Now, if I were to install an old version of the module then currently the build wonβt fail but after the proposed change it will. This is how it would prevent older versions of modules from running even if they were to run perfectly .Please do correct me if I am wrong