From e42f45208944da00c17bfcb0de21f12221631158 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 1 Nov 2018 14:21:40 +0100 Subject: [PATCH 1/5] vscode-dotty: default to a nightly with #5362 --- project/Build.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index a43f8ee96215..c82dc4e6685e 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -43,7 +43,7 @@ object Build { // This should be the latest published releases. // TODO: Have the vscode extension fetch these numbers from the Internet // instead of hardcoding them ? - val publishedDottyVersion = "0.11.0-bin-20181031-5a465af-NIGHTLY" // Using a nightly for now to get worksheet support + val publishedDottyVersion = "0.11.0-bin-20181101-714ce80-NIGHTLY" // Using a nightly for now to get worksheet support val publishedSbtDottyVersion = "0.2.6" From 8b543064f82fa59890866323fb6716c59c9d49da Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 1 Nov 2018 14:32:29 +0100 Subject: [PATCH 2/5] vscode-dotty: fix anonymity of tracing --- vscode-dotty/src/tracer.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vscode-dotty/src/tracer.ts b/vscode-dotty/src/tracer.ts index d3d655730382..9d5430a5bc16 100644 --- a/vscode-dotty/src/tracer.ts +++ b/vscode-dotty/src/tracer.ts @@ -69,7 +69,16 @@ export class Tracer { return persisted(uuidv4()) })() - this.projectId = vscode.workspace.name !== undefined ? vscode.workspace.name : 'no-project' + if (vscode.workspace.name !== undefined) { + // HACK: The projects cloned by students use the naming convention + // `$id-$name-$githubUsername`, so they leak the student's github + // username, to preserve anonymity, we drop the last part of the + // name. + this.projectId = vscode.workspace.name.replace(/^(\d+-.+)-.+$/, "$1") + } else { + this.projectId = 'no-project' + } + this.sessionId = new Date().toISOString() } From 1a3b00a65aafae7e5b11ff6a2165f23d3c0215e9 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 1 Nov 2018 15:48:34 +0100 Subject: [PATCH 3/5] vscode-dotty: relax unconfigured project check If .dotty-ide.json and .dotty-ide-artifact are present, then consider that the project is configured. This makes it possible to start the IDE in projects that don't use sbt. --- vscode-dotty/src/extension.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vscode-dotty/src/extension.ts b/vscode-dotty/src/extension.ts index c3d282b05062..38f2d7ed74cc 100644 --- a/vscode-dotty/src/extension.ts +++ b/vscode-dotty/src/extension.ts @@ -38,11 +38,13 @@ const sbtPluginFile = path.join(sbtProjectDir, "dotty-plugin.sbt") const sbtBuildPropertiesFile = path.join(sbtProjectDir, "build.properties") const sbtBuildSbtFile = path.join(workspaceRoot, "build.sbt") const languageServerArtifactFile = path.join(workspaceRoot, ".dotty-ide-artifact") +const languageServerConfigFile = path.join(workspaceRoot, ".dotty-ide.json") function isConfiguredProject() { return ( fs.existsSync(sbtPluginFile) || fs.existsSync(sbtBuildPropertiesFile) || fs.existsSync(sbtBuildSbtFile) + || (fs.existsSync(languageServerArtifactFile) && fs.existsSync(languageServerConfigFile)) ) } From dc88d6b9fb302e1f68e86d1f6802ef630bf29e5e Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 1 Nov 2018 14:36:27 +0100 Subject: [PATCH 4/5] vscode-dotty: release 0.1.9 --- project/Build.scala | 2 +- vscode-dotty/package-lock.json | 2 +- vscode-dotty/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index c82dc4e6685e..6b114cf45780 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -987,7 +987,7 @@ object Build { settings(commonSettings). settings( EclipseKeys.skipProject := true, - version := "0.1.9-snapshot", // Keep in sync with package.json + version := "0.1.9", // Keep in sync with package.json autoScalaLibrary := false, publishArtifact := false, includeFilter in unmanagedSources := NothingFilter | "*.ts" | "**.json", diff --git a/vscode-dotty/package-lock.json b/vscode-dotty/package-lock.json index effc026bac78..54fce978660f 100644 --- a/vscode-dotty/package-lock.json +++ b/vscode-dotty/package-lock.json @@ -1,6 +1,6 @@ { "name": "dotty", - "version": "0.1.9-snapshot", + "version": "0.1.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/vscode-dotty/package.json b/vscode-dotty/package.json index 3798f040196f..73dd8a4906db 100644 --- a/vscode-dotty/package.json +++ b/vscode-dotty/package.json @@ -2,7 +2,7 @@ "name": "dotty", "displayName": "Dotty Language Server", "description": "IDE integration for Dotty, the experimental Scala compiler", - "version": "0.1.9-snapshot", + "version": "0.1.9", "license": "BSD-3-Clause", "publisher": "lampepfl", "repository": { From 58f7832b008359a598d028af60a104f1f7d635ba Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 1 Nov 2018 14:40:51 +0100 Subject: [PATCH 5/5] vscode-dotty: bump to 0.1.10-snapshot --- project/Build.scala | 2 +- vscode-dotty/package-lock.json | 2 +- vscode-dotty/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index 6b114cf45780..f4091d6f625f 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -987,7 +987,7 @@ object Build { settings(commonSettings). settings( EclipseKeys.skipProject := true, - version := "0.1.9", // Keep in sync with package.json + version := "0.1.10-snapshot", // Keep in sync with package.json autoScalaLibrary := false, publishArtifact := false, includeFilter in unmanagedSources := NothingFilter | "*.ts" | "**.json", diff --git a/vscode-dotty/package-lock.json b/vscode-dotty/package-lock.json index 54fce978660f..10d1b80bc4a6 100644 --- a/vscode-dotty/package-lock.json +++ b/vscode-dotty/package-lock.json @@ -1,6 +1,6 @@ { "name": "dotty", - "version": "0.1.9", + "version": "0.1.10-snapshot", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/vscode-dotty/package.json b/vscode-dotty/package.json index 73dd8a4906db..6727ba0e6339 100644 --- a/vscode-dotty/package.json +++ b/vscode-dotty/package.json @@ -2,7 +2,7 @@ "name": "dotty", "displayName": "Dotty Language Server", "description": "IDE integration for Dotty, the experimental Scala compiler", - "version": "0.1.9", + "version": "0.1.10-snapshot", "license": "BSD-3-Clause", "publisher": "lampepfl", "repository": {