Sorry, something went wrong.
| for (final ModuleItem<?> item : items) { | ||
| final String name = item.getName(); | ||
| if (!item.isAutoFill()) continue; // skip unfillable inputs | ||
| if (module.isInputResolved(name)) continue; // skip resolved inputs |
There was a problem hiding this comment.
While working on this pull request, I noticed that the above line is specific to inputs only, so the method probably doesn't show the intended behavior when called with outputs.
The current unit tests seem to miss the method signatures specific to outputs (getSingleOutput).
I'll open a separate issue for this.
Sorry, something went wrong.
|
Sorry it's taken me so long to look at this. I now have a dedicated PR review day per week, and this one is on my shortlist right now to review, but I'm trying to apply the 80/20 rule to do the easiest ones first. My hangup on this one is the addition of the acrossTypes parameter. I know it's optional, and does not break backwards compatibility, but it does complexify the API, so I'm going to have a think on whether we truly need it for this new feature. Maybe not this week, maybe not next week, but soon, and for the rest of our lives. 🏠🇪🇸 |
Sorry, something went wrong.
This pull request is a work in progress.
This pull request changes the API of ModuleService and DefaultModuleService to include an optional parameter boolean acrossTypes that allows checking for solitary unresolved parameters within all inputs/outputs independent of their type, while maintaining the backwards-compatible method signatures.
This allows to replace some duplicated logic in helper methods of FilePreprocessor and FileListPreprocessor by a call to moduleService.getSingleInput(), which makes them respect an autoFill=false parameter annotation and avoid calling uiService.chooseFile/chooseFiles for those parameters.
The intended behavior is verified by two new tests that, before this PR, were failing on their last assertion.
NB: The tests added here call uiService.setHeadless(false) in order to set their custom default UI.