-
Notifications
You must be signed in to change notification settings - Fork 770
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
[READY] Use current working directory in JavaScript completer #886
[READY] Use current working directory in JavaScript completer #886
Conversation
Use the Client working directory when no .tern-project file is found. If not available, fall back to ycmd working directory.
Codecov Report
@@ Coverage Diff @@
## master #886 +/- ##
==========================================
- Coverage 94.97% 94.82% -0.16%
==========================================
Files 79 41 -38
Lines 5457 4018 -1439
Branches 172 0 -172
==========================================
- Hits 5183 3810 -1373
+ Misses 226 208 -18
+ Partials 48 0 -48 |
Yeah, I'll bring that change out separately. Thanks. Reviewed 3 of 3 files at r1. Comments from Reviewable |
r=puremourning
Reviewed 3 of 3 files at r1. Comments from Reviewable |
Riiight... Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
📌 Commit 2e2c043 has been approved by |
…puremourning [READY] Use current working directory in JavaScript completer Use the Client working directory instead of the home directory when no `.tern-project` file is found. If no working directory is given (no `working_dir` field in the request), we fall back to ycmd working directory. See issue ycm-core/YouCompleteMe#2857. Once this is merged, we'll update YCM to always include the working directory in the request as done in PR ycm-core/YouCompleteMe#2827. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/886) <!-- Reviewable:end -->
☀️ Test successful - status-appveyor, status-travis |
[READY] Always supply working directory This allows completer servers to detect the correct directory to launch no matter what request initialises the completer server. # PR Prelude Thank you for working on YCM! :) **Please complete these steps and check these boxes (by putting an `x` inside the brackets) _before_ filing your PR:** - [X] I have read and understood YCM's [CONTRIBUTING][cont] document. - [X] I have read and understood YCM's [CODE_OF_CONDUCT][code] document. - [X] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't. - [X] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.** # Why this change is necessary and useful This change ensures that the client supplies the working directory to the server on each request, in particular, event notifications; the java and javascript completers use this to start the server in the `FileReadyToParse` event, rather than on construction of the completer. The subtle difference allows them to use the client's working directory, rather than the _server's_ working directory to do things like project detection. See also: * This is PR 1 of the set of changes related to #2827 - client changes required to support Java and other language-server protocols. * ycmd change for javascript that makes use of this now: ycm-core/ycmd#886 * updated API doc: http://puremourning.github.io/ycmd-1 The ycmd API change is simply to allow `working_dir` on all requests. cc for minor optional API change: @abingham @Qusic @LuckyGeck @mawww @richard1122 @jakeanq @orsonteodoro [cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md [code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2861) <!-- Reviewable:end -->
[READY] Update ycmd Include the following changes: - PR ycm-core/ycmd#789: add support for Windows flags when --driver-mode=cl is given; - PR ycm-core/ycmd#848: hide C++ symbols by default; - PR ycm-core/ycmd#857: add Java support using jdt.ls; - PR ycm-core/ycmd#861: translate libclang error codes to exceptions; - PR ycm-core/ycmd#880: support downloading Clang binaries on ARM systems; - PR ycm-core/ycmd#883: handle zero column diagnostic from OmniSharp; - PR ycm-core/ycmd#884: specify Platform property when compiling OmniSharp; - PR ycm-core/ycmd#886: use current working directory in JavaScript completer; - PR ycm-core/ycmd#887: update Boost to 1.66.0; - PR ycm-core/ycmd#888: update JediHTTP; - PR ycm-core/ycmd#889: update Clang to 5.0.1; - PR ycm-core/ycmd#891: fix building with system libclang on Gentoo amd64; - PR ycm-core/ycmd#904: drop Python 2.6 and Python 3.3 support; - PR ycm-core/ycmd#905: calculate the start column when items are not resolved in the language server completer; - PR ycm-core/ycmd#912: download Clang binaries from HTTPS; - PR ycm-core/ycmd#914: do not try to symlink libclang on Windows. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2902) <!-- Reviewable:end -->
Use the Client working directory instead of the home directory when no
.tern-project
file is found. If no working directory is given (noworking_dir
field in the request), we fall back to ycmd working directory. See issue ycm-core/YouCompleteMe#2857.Once this is merged, we'll update YCM to always include the working directory in the request as done in PR ycm-core/YouCompleteMe#2827.
This change is