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

ycmd: 2016-01-12 -> 2017-02-03 #22490

Merged
merged 2 commits into from Feb 10, 2017
Merged

ycmd: 2016-01-12 -> 2017-02-03 #22490

merged 2 commits into from Feb 10, 2017

Conversation

cstrahan
Copy link
Contributor

@cstrahan cstrahan commented Feb 6, 2017

Also, remove wrapper bash script and symlink completion backends to ycmd can find them.

This builds on #22463 and should fix #14349.

@mention-bot
Copy link

@cstrahan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh, @rasendubi and @dezgeg to be potential reviewers.

@cstrahan
Copy link
Contributor Author

cstrahan commented Feb 6, 2017

With the code as it is right now, I inject the following into __main__.py:

import os; os.environ['PATH'] = ('{0}:{1}' if os.getenv('PATH', '') != '' else '{1}').format('$program_PATH', os.getenv('PATH', ''))

... where $program_PATH is substituted with the environment variable that the wrapPython hook sets up.

That preserves the behavior of the wrapper script, but I don't know if it's really necessary. In fact, that puts the build-time python on PATH (as should be expected), which could can then cause problems for some people's use of ycmd -- ycmd will by default attempt to start the JediHTTP with the pthon on PATH which will end up being python 2, but that'll cause problems if someone want's to, say in a shell.nix, put python 3 on their PATH so they can have JediHTTP parse their python 3 project. They can always specify a specific python in their config... but IMO the PATH based approach should continue to work.

So, I think I'm not going to try to preserve the PATH manipulation -- I don't think it'll cause any problems to do so in this package.

@cstrahan
Copy link
Contributor Author

cstrahan commented Feb 6, 2017

Also TODO in a separate PR: have the vim plugin use this package, instead of it also compiling ycmd.

Also, remove wrapper bash script and symlink completion backends to
ycmd can find them.
YouCompleteMe needs the packages to be available in ycmd's third_party
directory, and things start getting pretty complicated when we try to
use our package libs instead of the vendored ones. We can revisit this
at a later time, but we'll need to ensure that we don't break the vim
plugin.

Tested in vim.
@cstrahan
Copy link
Contributor Author

In the latest commit I've switched to using the vendored python libs - YouCompleteMe expects that it can source those libs, and things get very tricky when trying to use our packaged libraries while trying not to break YCM's assumptions. We could probably patch YCM's source, but by using the vendored python libs, we make our packaged YouCompleteMe and ycmd work seamlessly together (see #22614 for the changes to the vim plugin).

@cstrahan cstrahan merged commit 4ca258e into NixOS:master Feb 10, 2017
@rasendubi
Copy link
Member

This does seem to break darwin build: https://hydra.nixos.org/build/48027016

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

Successfully merging this pull request may close these issues.

ycmd fails to work with Atom you-complete-me plugin due to wrapper script
4 participants