With the merge of scijava/incubator@2adac43 we now have @Optional parameters. This comes with the caveat that parameters should only be declared in one location, i.e. either an op interface or method implementation, but not both.
The optional-op-param-validation adds tests creating this ambiguous state.
In ops, this state is currently detected and a ValidityProblem is created to record the issue.
However, the actual call into detecting parameter optionality is just passing an anonymous list that is immediately discarded. This results in op requests failing with no information actually provided.
We should, at the least, be actually propagating ValidityProblems and including them in any "No candidates found" report at the end of a failed matching session.
^ this may not be necessary any more since scijava/incubator#83
But I suggest the following:
With the merge of scijava/incubator@2adac43 we now have
@Optionalparameters. This comes with the caveat that parameters should only be declared in one location, i.e. either an op interface or method implementation, but not both.The optional-op-param-validation adds tests creating this ambiguous state.
In ops, this state is currently detected and a ValidityProblem is created to record the issue.
However, the actual call into detecting parameter optionality is just passing an anonymous list that is immediately discarded. This results in op requests failing with no information actually provided.
We should, at the least, be actually propagating
ValidityProblemsand including them in any "No candidates found" report at the end of a failed matching session.^ this may not be necessary any more since scijava/incubator#83
But I suggest the following:
problemslists like this one.ValidityProblemto an enum and use that instead of message string comparisonValidityProblemtype, modeled after theOpMethodDependencyPositionTest