Added basic validation to Fontus' configuration. #15
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.
First step towards #14.
It is fairly easy to leave old clutter in your configuration, which will, in some cases, fail more or less silently.
For example, I just copied a config from one of the tested programs for the CCS paper, and it contained the following converter:
This predates the name change, which is like 2y+ old. In case the converter was actually applied, this would try to call a method that does not exist anymore.
This patch aims to fix this by trying to assess whether the converters are actually in the classpath. It only prints out warnings, as failing would be a) a breaking change b) prevent building a generic configuration that works across programs.
The latter is due to the fact that we ship some converters which rely on the presence of third-party libraries, such as
DGMMethodConverter. It is also included in most Fontus configs I have on my system, so it's probably fairly widespread. I'd like to avoid breaking all of them, so this simply warns if you define converters that can not be applied without error.
Example output:
The stack trace originates from the DGMMethodConverter, I'll clean that up separately.