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

[WIP] Adopt flag prep logic #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jerrymarino
Copy link
Owner

Move flag prep to the server: convert a command from a CompilationDatabase to arguments we can use for completions and other tasks.

We need to process flags for diagnostics and it is more reasonable to have all of this flag logic happen in 1 place, and have clear definitions of what the server accepts as input for these flags.

Now the client simply loads a CompilationDatabase, and sends us commands from that. The CompilationDatabase should be an input to Swift services and tools ( like how this works in clang ).

TODO:
Additionally consider making the flags accept a string instead of an array. It is insane to convert the string to an array on the client i.e. shlex on the client!

resolves #6

Send a corresponding a PR to YCMD as well ( or just something merge into ycm-core/ycmd#487 )

This causes an issue for the semantic diagnostic phase.

Remove this flag on the server to simplify the client.
In hindsight, it was a shitty decision to put flag prep in the client (
Probably a whisky driven design decision ) Revert this mistake.

The CompilationDatabase should be an input to Swift services and tools (
like how this works in clang ).

Now the client simply prepares a CompilationDatabase, and sends us
commands from that.

We need to process flags for diagnostics and it is more reasonable to
have all of this flag logic happen in 1 place, and have clear
definitions of what the server accepts as input for these flags.

resolves #6

There should be a PR to YCMD as well ( or just merge into
ycm-core/ycmd#487 )

TODO:
Additionally consider making the flags accept a string instead of an
array. It is insane to convert the string to an array on the client.
@jerrymarino jerrymarino force-pushed the jmarino_move_flag_prep_logic branch from dbb3293 to eda08c0 Compare June 1, 2017 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider moving CompilationDatabase flag preparation logic into the server
1 participant