coala / coala/coala-quickstart

Investigate: how to use the nextgen-core for more reliable and easier processing of bears

Open
#311 1 comment 0 reactions 0 assignees View on GitHub
area/CI enhancement
Dominant language
Python
Stars
49
Forks
74
PR merge metrics
No merged PRs in 30d

Description

The NextGen-Core brings many advantages over the old core as well as being way easier to use. The simple interface is designed to be operated by external python programs if more control of the code-environment and analysis is required.

coala-quickstart currently hacks around the old bear processing facilities which are not convenient to use what makes code using it highly likely to be buggy.

To get free of that and moving towards a more reliable and better API, the NextGen-Core API should be used. The NextGen-Core already exists, however it's not yet integrated in the coala core tool itself.

The new core's main entrypoint is `run`:
```python
from coalib.core.Core import run
```
Its signature is as follows:
```python
def run(bears, result_callback, cache=None, executor=None):
```
However, current bears cannot be run with that function as new v2 bears from `coalib.Core.Bear` exist to better interface with the new core.

This issue is about discussing possible solutions to use the new core here in coala-quickstart.

@ishanSrt mentioned additional requirements, like:
> I especially recall that you wanted to stop running bears immediately once you get a result from them, as this means that the tried settings are not good enough for a generated config.

My idea to solve this is to maintain a single custom processing pool and maintain many core sessions at once. If one bear fails / emits a result in one specific session, other sessions that run bear tasks belonging together in this matter can be stopped reliably.

Another issue seems to be the speed of linter bears: The effort needed to start new processes all the time is very high, especially for linters running on Python or other runtimes that have a certain amount of startup time. There are possibilities (like for Python) to keep the runtime alive and inject commands into it repeatedly running our tasks.

CC @ishanSrt :)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with coala-quickstart's current bear-processing path and the NextGen-Core entry point, `from coalib.core.Core import run`, including its `bears`, `result_callback`, `cache`, and `executor` parameters. Review how v2 bears from `coalib.Core.Bear` differ from current bears and document an integration approach that handles early stopping and repeated linter execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.