-
Notifications
You must be signed in to change notification settings - Fork 53
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
cEP 23: Breaking down coala #140
base: master
Are you sure you want to change the base?
Conversation
Seems like that questions from #117 are relevant for this proposal as well. |
Once coala/coala-bears#2446 is merged, we can experiment with generating Bear source from yaml files, which will help establish feasibility. There is also the potential for generating test modules, and possibly those test modules will be better than the current ones as they will benefit from generics. |
# Breaking down coala | ||
|
||
| Metadata | | | ||
|----------|-----------------------------------------------| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text does not comply to the set style.
Origin: MarkdownBear, Section: markdown
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpzr0a2jlu/cEP-0023.md
+++ b/tmp/tmpzr0a2jlu/cEP-0023.md
@@ -1,7 +1,7 @@
# Breaking down coala
| Metadata | |
-|----------|-----------------------------------------------|
+| -------- | --------------------------------------------- |
| cEP | 0023 |
| Version | 1.0 |
| Title | Breaking down the coala |
local = true | ||
executable = space_consistency_bear.py | ||
output_regex = .+:(?P<line>\d+): (?P<message>.*) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text does not comply to the set style.
Origin: MarkdownBear, Section: markdown
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpzr0a2jlu/cEP-0023.md
+++ b/tmp/tmpzr0a2jlu/cEP-0023.md
@@ -151,7 +151,6 @@
local = true
executable = space_consistency_bear.py
output_regex = .+:(?P<line>\d+): (?P<message>.*)
-
The coala Engine will intepret the following file, setup the command arguments,
## The RPC | ||
|
||
The RPC will follow the JSON-RPC specification | ||
(https://www.jsonrpc.org/specification). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text does not comply to the set style.
Origin: MarkdownBear, Section: markdown
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpzr0a2jlu/cEP-0023.md
+++ b/tmp/tmpzr0a2jlu/cEP-0023.md
@@ -171,7 +171,7 @@
## The RPC
The RPC will follow the JSON-RPC specification
-(https://www.jsonrpc.org/specification).
+(<https://www.jsonrpc.org/specification>).
The methods will be the following:
* `start`
(https://www.jsonrpc.org/specification). | ||
|
||
The methods will be the following: | ||
* `start` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text does not comply to the set style.
Origin: MarkdownBear, Section: markdown
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpzr0a2jlu/cEP-0023.md
+++ b/tmp/tmpzr0a2jlu/cEP-0023.md
@@ -174,10 +174,12 @@
(https://www.jsonrpc.org/specification).
The methods will be the following:
- * `start`
- * `commit`
+
+- `start`
+- `commit`
The following examples will use the syntax below:
+
--> data sent to the Engine
<-- data sent to the Frontend
|
||
### `commit` | ||
|
||
`commit` will commit an action proposed by the Engine and pass onto the next warning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line must be at most 80 characters maximum-line-length remark-lint
Origin: MarkdownBear, Section: markdown
.
addition, bears in essence can do anything it wants to since it is just a Python | ||
class that is loaded into the coala process. | ||
|
||
This caused numerous unwanted regressions between bears and coala and costed a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe an example here? What regression/problem did the current architecture bring about?
|
||
Meanwhile, the coala Engine's sole job is to intepret the bear files and | ||
execute/supervise the linter/helper programs along with committing the action | ||
that is requsted by the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a typo here :P
Bears are now just simple formatted plain-text file containing the metadata | ||
needed. It can also contain a simple program as helpers or sole linters. | ||
|
||
coala will separated into two parts: The coala Engine and The coala CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be separated
the coala Engine. The CLI will present the output of the Engine and present them | ||
with possible actions that the user can do. | ||
|
||
Meanwhile, the coala Engine's sole job is to intepret the bear files and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a typo: intepret
before the program (e.g generating the configuration file) and do stuff | ||
after it (e.g cleaning). | ||
|
||
The frontend and backend programs will communicate to each other via json-rpc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not very clear which programs frontend
and backend
are referring to. I assume frontend
= coala CLI
and backend = coala Engine
, but it would be better to be more precise.
Bears are now just simple formatted plain-text file containing the metadata | ||
needed. It can also contain a simple program as helpers or sole linters. | ||
|
||
coala will separated into two parts: The coala Engine and The coala CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of one coala process, there will be two separate processes in the new architecture, is my understanding correct? Maybe this paragraph can be elaborated a bit more :)
after it (e.g cleaning). | ||
|
||
The frontend and backend programs will communicate to each other via json-rpc. | ||
json-rpc is chosen for it's simplicity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One advantage of using RPC I can think of is: in the future the coala Engine might be able to run on the cloud and users only need a coala CLI running locally.
But do we need an RPC framework if we only use it for local interprocess communication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use JSON-RPC because it is easier than other IPC/RPC implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we want it to be easily used by other programs such as plugins for a text editor or maybe a GUI version of the frontend.
Seems this proposal involves two parts: part (1). separate coala core into 2 parts. Are they independent? Is |
Closes #138