Skip to content

Fix #3111: Fix dependencies of vscode-dotty #3131

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

Merged
merged 1 commit into from
Oct 17, 2017

Conversation

smarter
Copy link
Member

@smarter smarter commented Sep 15, 2017

Using "^2.2.1" means "Any 2.x.y version >= 2.2.1", this isn't great for
reproducibility in general, and it also broke the build because
vscode-languageclient 3.4.* depend on a newer vscode engine. This commit
avoids this issue by using fixed version numbers instead.

Review by @esarbe ?

@esarbe
Copy link
Contributor

esarbe commented Sep 16, 2017

Using this fix I get the following error:
(after removing node_modules and running npm update)

> launchIDE
[info] Compiling 9 Scala sources to /home/esarbe/source/dotty/compiler/target/scala-2.12/classes...
[info] Compiling 33 Scala sources to /home/esarbe/source/dotty/compiler/target/scala-2.12/classes...
[warn] there was one unchecked warning; re-run with -unchecked for details
[warn] one warning found
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
[info] Packaging /home/esarbe/source/dotty/compiler/target/scala-2.12/dotty-compiler_2.12-0.4.0-bin-SNAPSHOT-nonbootstrapped.jar ...
[info] Done packaging.
[info] Compiling 9 Scala sources to /home/esarbe/source/dotty/compiler/../out/bootstrap/dotty-compiler-bootstrapped/scala-0.4/classes...
[info] Compiling 38 Scala sources to /home/esarbe/source/dotty/compiler/../out/bootstrap/dotty-compiler-bootstrapped/scala-0.4/classes...
[info] Compiling 4 Scala sources to /home/esarbe/source/dotty/doc-tool/../out/bootstrap/dotty-doc-bootstrapped/scala-0.4/classes...
[info] Compiling 10 Scala sources and 1 Java source to /home/esarbe/source/dotty/compiler/../out/bootstrap/dotty-compiler-bootstrapped/scala-0.4/test-classes...
[info] Compiling 3 Scala sources to /home/esarbe/source/dotty/compiler/../out/bootstrap/dotty-compiler-bootstrapped/scala-0.4/test-classes...

> [email protected] update-all /home/esarbe/source/dotty/vscode-dotty
> npm install && node ./node_modules/vscode/bin/install && curl -L -o out/coursier https://github.com/coursier/coursier/raw/v1.0.0-RC3/coursier

Detected VS Code engine version: ^1.12.0
Found minimal version that qualifies engine range: 1.12.0
Fetching vscode.d.ts from: https://raw.githubusercontent.com/Microsoft/vscode/1.12.0/src/vs/vscode.d.ts
vscode.d.ts successfully installed!

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   137  100   137    0     0    168      0 --:--:-- --:--:-- --:--:--   168
100 11814  100 11814    0     0  10605      0  0:00:01  0:00:01 --:--:-- 10605

18 process.stdout.setEncoding('utf8')
                  ~~~~~~~~~~~

vscode-dotty/src/passthrough-server.ts(18,16): error TS2339: Property 'setEncoding' does not exist on type 'WritableStream'.

[error] Running command "/home/esarbe/source/dotty/vscode-dotty/node_modules/.bin/tsc --pretty --project /home/esarbe/source/dotty/vscode-dotty" failed.
[error] (vscode-dotty/compile:compile) Running command "/home/esarbe/source/dotty/vscode-dotty/node_modules/.bin/tsc --pretty --project /home/esarbe/source/dotty/vscode-dotty" failed.
[error] Total time: 11 s, completed Sep 16, 2017 6:30:36 PM
> launchIDE
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list

1 import * as code from 'vscode';
                        ~~~~~~~~

vscode-dotty/node_modules/vscode-languageclient/lib/codeConverter.d.ts(1,23): error TS2307: Cannot find module 'vscode'.


4 import { Disposable, OutputChannel, FileSystemWatcher, DiagnosticCollection, CancellationToken } from 'vscode';
                                                                                                        ~~~~~~~~

vscode-dotty/node_modules/vscode-languageclient/lib/main.d.ts(4,103): error TS2307: Cannot find module 'vscode'.


1 import * as code from 'vscode';
                        ~~~~~~~~

vscode-dotty/node_modules/vscode-languageclient/lib/protocolCompletionItem.d.ts(1,23): error TS2307: Cannot find module 'vscode'.


1 import * as code from 'vscode';
                        ~~~~~~~~

vscode-dotty/node_modules/vscode-languageclient/lib/protocolConverter.d.ts(1,23): error TS2307: Cannot find module 'vscode'.


9 import { commands, workspace, Disposable, ExtensionContext, Uri } from 'vscode';
                                                                         ~~~~~~~~

vscode-dotty/src/extension.ts(9,72): error TS2307: Cannot find module 'vscode'.


12 import * as vscode from 'vscode';
                           ~~~~~~~~

vscode-dotty/src/extension.ts(12,25): error TS2307: Cannot find module 'vscode'.


18 process.stdout.setEncoding('utf8')
                  ~~~~~~~~~~~

vscode-dotty/src/passthrough-server.ts(18,16): error TS2339: Property 'setEncoding' does not exist on type 'WritableStream'.

[error] Running command "/home/esarbe/source/dotty/vscode-dotty/node_modules/.bin/tsc --pretty --project /home/esarbe/source/dotty/vscode-dotty" failed.
[error] (vscode-dotty/compile:compile) Running command "/home/esarbe/source/dotty/vscode-dotty/node_modules/.bin/tsc --pretty --project /home/esarbe/source/dotty/vscode-dotty" failed.
[error] Total time: 3 s, completed Sep 16, 2017 7:01:28 PM

Add a package-lock.json file to fix the dependencies to known good
versions instead of letting npm install pick whatever it wants that
respects semantic versioning.
@smarter
Copy link
Member Author

smarter commented Oct 12, 2017

@esarbe Fixed, sorry for the delay! I also added a package-lock.json to really fix all the transitive dependencies.

@smarter smarter requested a review from allanrenucci October 12, 2017 14:40
Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to fix the issue

@smarter smarter merged commit 8c82987 into scala:master Oct 17, 2017
@allanrenucci allanrenucci deleted the fix-vscode-deps branch October 17, 2017 14:02
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.

3 participants