-
Notifications
You must be signed in to change notification settings - Fork 769
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] Remove nodejs workaround #1075
Conversation
Users should install the nodejs-legacy package on Debian-based distributions.
f7096cb
to
8713009
Compare
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'm not sure this is the right way to solve the problem. Python2 is nearing its EOL, but node
and nodejs
executables seem like they will stay. If we drop the node
/nodejs
workaround we'd be inconveniencing the users, but then when we drop python2 we would be able to reintroduce the support for nodejs
.
Telling the users to install a legacy package seems too much like the mess we have with libclang depending on libtinfo. Only now we're not saying "use a legacy package" to the rolling release users, who kind of signed up for getting their hands dirty, but to users of LTS distros and, even more concerning, users who want something that "just works"(tm). Reminder that users of debian based distros are far greater in number - it makes me a little afraid of the number of "bug reports" along the lines of what we have seen about libtinfo.
Reviewable status: 0 of 2 LGTMs obtained
Codecov Report
@@ Coverage Diff @@
## master #1075 +/- ##
==========================================
- Coverage 97.53% 97.52% -0.01%
==========================================
Files 90 89 -1
Lines 6968 6957 -11
==========================================
- Hits 6796 6785 -11
Misses 172 172 |
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 reason why I think we shouldn't bother looking for nodejs
is that users have to install the nodejs-legacy
package anyway if they want to use TypeScript. Otherwise, they'll get the following error when compiling:
$ tsc
/usr/bin/env: ‘node’: No such file or directory
Reviewed 2 of 6 files at r1.
Reviewable status: 0 of 2 LGTMs obtained
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.
That's a fair argument, considering that tern completer isn't necessary for javascript completion any more. If we do decide to drop nodejs
, we should be ready for the bug reports.
Reviewable status: 0 of 2 LGTMs obtained
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.
Reviewable status: 0 of 2 LGTMs obtained (and 1 stale)
ycmd/completers/javascript/tern_completer.py, line 51 at r1 (raw file):
'tern' ) ) PATH_TO_NODE = utils.FindExecutable( 'node' )
The challenge with removing this is that there is a node
executable on those systems (iirc, like ubuntu) but it isn't a NodeJS node
. I think this leads to obscure errors that most users won't understand.
Perhaps we could consider (perhaps for a future change) running node and trying to get its version or something, then failing if 'node' is not a recognisable NodeJS installation?
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.
Reviewed 4 of 6 files at r1.
Reviewable status: 1 of 2 LGTMs obtained
ycmd/completers/javascript/tern_completer.py, line 51 at r1 (raw file):
Previously, puremourning (Ben Jackson) wrote…
The challenge with removing this is that there is a
node
executable on those systems (iirc, like ubuntu) but it isn't a NodeJSnode
. I think this leads to obscure errors that most users won't understand.Perhaps we could consider (perhaps for a future change) running node and trying to get its version or something, then failing if 'node' is not a recognisable NodeJS installation?
We could but I don't want to spend too much time on this since the Tern completer is in low maintenance mode. I think the easiest would be to mention the issue in the docs.
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.
Reviewable status: 1 of 2 LGTMs obtained
ycmd/completers/javascript/tern_completer.py, line 51 at r1 (raw file):
Previously, micbou wrote…
We could but I don't want to spend too much time on this since the Tern completer is in low maintenance mode. I think the easiest would be to mention the issue in the docs.
I agree with @micbou. We could also consider, when these issues pop up, suggesting to users a switch to TSServer.
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.
Reviewed 6 of 6 files at r1.
Reviewable status: 1 of 2 LGTMs obtained
ycmd/completers/javascript/tern_completer.py, line 51 at r1 (raw file):
Previously, bstaletic (Boris Staletic) wrote…
I agree with @micbou. We could also consider, when these issues pop up, suggesting to users a switch to TSServer.
OK sure. I didn't notice this was tern. No problem.
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.
Reviewed 6 of 6 files at r1.
Reviewable status: 1 of 2 LGTMs obtained (and 1 stale)
@zzbot r=ppuremourning |
📌 Commit 8713009 has been approved by |
[READY] Remove nodejs workaround Opening a file without setting the encoding may fail on Python 2. See issue ycm-core/YouCompleteMe#3101. We could use the `ReadFile` utility function to fix the issue but I think we are better off dropping the `nodejs` workaround altogether (looking for the `nodejs` executable before `node` because `nodejs` is the name of the Node binary on Debian-based distributions). Users should install the `nodejs-legacy` package on such distributions. Fixes ycm-core/YouCompleteMe#3101. <!-- 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/1075) <!-- Reviewable:end -->
☀️ Test successful - status-appveyor, status-travis |
[READY] Update ycmd Include the following changes: - PR ycm-core/ycmd#1075: remove Node.js workaround for Debian-based distributions; - PR ycm-core/ycmd#1077: update Boost to 1.68; - PR ycm-core/ycmd#1078: add semantic trigger for Julia; - PR ycm-core/ycmd#1081: improve type information on C++ member functions; - PR ycm-core/ycmd#1086: check if Python headers are installed before building; - PR ycm-core/ycmd#1088: raise proper exception for commands when file is still being parsed in C-family languages; - PR ycm-core/ycmd#1098: update Go completer; - PR ycm-core/ycmd#1099: update regex submodule; - PR ycm-core/ycmd#1100: add Python path to debugging information; - PR ycm-core/ycmd#1103: support framework headers completion and code navigation in C-family languages; - PR ycm-core/ycmd#1107: update Clang to 7.0.0; - PR ycm-core/ycmd#1109: update jdt.ls to 0.25.0; - PR ycm-core/ycmd#1110: handle null hover response from language servers; - PR ycm-core/ycmd#1111: update list of completion kinds defined by LSP; - PR ycm-core/ycmd#1113: send completion item kinds capability to language servers; - PR ycm-core/ycmd#1116: update Parso to 0.3.1 and Jedi to 0.13.1. Closes #3138. Closes #3145. <!-- 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/3175) <!-- Reviewable:end -->
Opening a file without setting the encoding may fail on Python 2. See issue ycm-core/YouCompleteMe#3101. We could use the
ReadFile
utility function to fix the issue but I think we are better off dropping thenodejs
workaround altogether (looking for thenodejs
executable beforenode
becausenodejs
is the name of the Node binary on Debian-based distributions). Users should install thenodejs-legacy
package on such distributions.Fixes ycm-core/YouCompleteMe#3101.
This change is