You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current interface of EOOdinAnalyzer.EOOdinXmirAnalyzer() has the following signature:
traitEOOdinAnalyzer[R] {
@throws[Exception]
defanalyze(
eoRepr: R
): java.util.List[OdinAnalysisErrorInterop]
}
This signature works fine for a single analyzer. It either returns a result (which is a List of errors) or fails with an Exception. Problems begin when we try to cram multiple analyzers into this interface. Let's say we run 2 analyzers: the 1st succeeds and the 2nd fails. In this case we get only an exception coming from the 2nd analyzer, whereas the results of the 1st are lost.
So, if we want to support running multiple analyzers, then the shape of this API has to change. The most straightforward seems to parameterize the interface not only by the input type, but also by the analysis type:
traitEOOdinAnalyzer[R, A] { // A stands for AnalysisType@throws[Exception]
defanalyze(
eoRepr: R,
analyzer: A
): java.util.List[OdinAnalysisErrorInterop]
}
The current interface of
EOOdinAnalyzer.EOOdinXmirAnalyzer()
has the following signature:This signature works fine for a single analyzer. It either returns a result (which is a
List
of errors) or fails with an Exception. Problems begin when we try to cram multiple analyzers into this interface. Let's say we run 2 analyzers: the 1st succeeds and the 2nd fails. In this case we get only an exception coming from the 2nd analyzer, whereas the results of the 1st are lost.So, if we want to support running multiple analyzers, then the shape of this API has to change. The most straightforward seems to parameterize the interface not only by the input type, but also by the analysis type:
And then implement if for a second analyzer:
@yegor256 what do you think?
The text was updated successfully, but these errors were encountered: