We could find some use with having @OpenmrsProfile being able to filter for modules that are absent. Is there a way to specify this currently?
Looking at OpenmrsProfileExcludeFilter (here) I am under the impression that there is no way to currently do that.
If I’m correct, could this be an acceptable syntax for such cases?
@OpenmrsProfile(modules = {"moduleId:_"})
Could you let me know if this is a valid/worthy idea?
Yes it is a consequence of attempting a full leverage of the ‘aware of’ config directive.
When doing so one might not so much be interested in filtering for ranges of versions of a module, but rather to know whether a module is present (with any version) or missing.
Our specific use case is about AH’s awareness of Ext I18N.
If Ext I18N is present it should provide an implementation to one of AH’s interfaces.
@OpenmrsProfile(modules = {"exti18n:*"})
If Ext I18N is absent then AH itself should provide a default implementation to its interface.
@OpenmrsProfile(modules = {"exti18n:_"})
The above config could be put in place, with @Autowired-annotated instances of AH’s interface, that would work both at runtime and within context-sensitive tests. See also ‘Core: enabling context-sensitive tests to start modules’.