Skip to content

Commit 4075b97

Browse files
authored
Merge pull request #5365 from dotty-staging/vscode-dotty-0.1.9
Release vscode-dotty 0.1.9
2 parents c2ac976 + 58f7832 commit 4075b97

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

project/Build.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ object Build {
4343
// This should be the latest published releases.
4444
// TODO: Have the vscode extension fetch these numbers from the Internet
4545
// instead of hardcoding them ?
46-
val publishedDottyVersion = "0.11.0-bin-20181031-5a465af-NIGHTLY" // Using a nightly for now to get worksheet support
46+
val publishedDottyVersion = "0.11.0-bin-20181101-714ce80-NIGHTLY" // Using a nightly for now to get worksheet support
4747
val publishedSbtDottyVersion = "0.2.6"
4848

4949

@@ -987,7 +987,7 @@ object Build {
987987
settings(commonSettings).
988988
settings(
989989
EclipseKeys.skipProject := true,
990-
version := "0.1.9-snapshot", // Keep in sync with package.json
990+
version := "0.1.10-snapshot", // Keep in sync with package.json
991991
autoScalaLibrary := false,
992992
publishArtifact := false,
993993
includeFilter in unmanagedSources := NothingFilter | "*.ts" | "**.json",

vscode-dotty/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vscode-dotty/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dotty",
33
"displayName": "Dotty Language Server",
44
"description": "IDE integration for Dotty, the experimental Scala compiler",
5-
"version": "0.1.9-snapshot",
5+
"version": "0.1.10-snapshot",
66
"license": "BSD-3-Clause",
77
"publisher": "lampepfl",
88
"repository": {

vscode-dotty/src/extension.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ const sbtPluginFile = path.join(sbtProjectDir, "dotty-plugin.sbt")
3838
const sbtBuildPropertiesFile = path.join(sbtProjectDir, "build.properties")
3939
const sbtBuildSbtFile = path.join(workspaceRoot, "build.sbt")
4040
const languageServerArtifactFile = path.join(workspaceRoot, ".dotty-ide-artifact")
41+
const languageServerConfigFile = path.join(workspaceRoot, ".dotty-ide.json")
4142

4243
function isConfiguredProject() {
4344
return ( fs.existsSync(sbtPluginFile)
4445
|| fs.existsSync(sbtBuildPropertiesFile)
4546
|| fs.existsSync(sbtBuildSbtFile)
47+
|| (fs.existsSync(languageServerArtifactFile) && fs.existsSync(languageServerConfigFile))
4648
)
4749
}
4850

vscode-dotty/src/tracer.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,16 @@ export class Tracer {
6969
return persisted(uuidv4())
7070
})()
7171

72-
this.projectId = vscode.workspace.name !== undefined ? vscode.workspace.name : 'no-project'
72+
if (vscode.workspace.name !== undefined) {
73+
// HACK: The projects cloned by students use the naming convention
74+
// `$id-$name-$githubUsername`, so they leak the student's github
75+
// username, to preserve anonymity, we drop the last part of the
76+
// name.
77+
this.projectId = vscode.workspace.name.replace(/^(\d+-.+)-.+$/, "$1")
78+
} else {
79+
this.projectId = 'no-project'
80+
}
81+
7382
this.sessionId = new Date().toISOString()
7483
}
7584

0 commit comments

Comments
 (0)