Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Makman2 opened this issue Aug 26, 2018 · 1 comment

Comments

@Makman2
Copy link
Member

Makman2 commented Aug 26, 2018

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:

from coalib.core.Core import run

Its signature is as follows:

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 :)

@jayvdb
Copy link
Member

jayvdb commented Oct 13, 2018

Depends on #318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants