Open
Description
The current implementation of flycheck is flawed in that it instantiates at most a single "flycheck instance" for each workspace. With the introduction of rust-analyzer.toml
files, more fine-grained configuration has become possible. Therefore, we need more flexibility in flycheck instances. At the same time, we want to avoid having many `flycheck' threads, as this is clearly inefficient.
Another issue that also needs to be addressed is how hard it is to test any kind of flycheck activity. The new model should make testing less of a problem for us.
Some key points about the new approach
- A thread pool will be used to avoid unnecessary initialization/destruction of threads. The number of threads will be configurable.
- Threads are used to execute whatever flycheck op is waiting to be executed. To map the results of a
flycheck' instance to the corresponding workspace, it was previously sufficient to keep a
workspace id'. The new model could use a hash ofworkspace_id * target * other things I can't think of
to compute an id. - More points to come in the next few days.