diff --git a/project/Build.scala b/project/Build.scala index a43f8ee96215..f4091d6f625f 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" @@ -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.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 effc026bac78..10d1b80bc4a6 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.10-snapshot", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/vscode-dotty/package.json b/vscode-dotty/package.json index 3798f040196f..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-snapshot", + "version": "0.1.10-snapshot", "license": "BSD-3-Clause", "publisher": "lampepfl", "repository": { 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)) ) } 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() }