Fix in validation so that warnings are not reported as errors #1643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This does not change the output of
lfc
even when an error appears in an imported reactor.The code just was not doing much except for redundant work, since it was being invoked after a round of validation checks had already passed. Actually it was even worse than that, because it was running the validator without the right
ValidationIssueAcceptor
injected, resulting in behavior that was not consistent with that implemented inStandaloneIssueAcceptor
. This is why warnings were (wrongly) being converted to errors.I decided to delete the method in
GeneratorUtils
rather than a) make this code work properly and b) spend some unknown number of hours fighting with Guice. I think this is an acceptable solution because it is doubtful whether the behavior that the method was supposed to implement is what we want. Specifically, if an error is reported on an imported reactor, it is not obvious to me that the error should also be reported on import statements that import the reactor.