Define new event target for JSON, and revert option passing
For the program to be consistent, the 'EventListener' target that we pass to a Project should be responsible for the output format. Otherwise, we are contingent on developers to remember passing the option at call-site. Plus, it overloads the project code with an extra boolean option. Instead, since the behaviour is solely driven by the execution context, we can instantiate a different event target upfront, and simply hold on to it throughout the program. As a nice side-effect, we can gently re-organize the code to keep the terminal printing logic and the json printing logic separate.
This commit is contained in:
@@ -38,7 +38,6 @@ impl LspProject {
|
||||
PropertyTest::DEFAULT_MAX_SUCCESS,
|
||||
Tracing::verbose(),
|
||||
None,
|
||||
false,
|
||||
);
|
||||
|
||||
self.project.restore(checkpoint);
|
||||
|
||||
Reference in New Issue
Block a user