Skip to content

Commit db52072

Browse files
committed
Address review
1 parent cf2c367 commit db52072

File tree

2 files changed

+9
-24
lines changed

2 files changed

+9
-24
lines changed

vscode-dotty/src/extension.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as fs from 'fs';
44
import * as path from 'path';
55

6-
import * as cpp from 'promisify-child-process';
6+
import * as pcp from 'promisify-child-process';
77
import * as compareVersions from 'compare-versions';
88

99
import { ChildProcess } from "child_process";
@@ -39,11 +39,10 @@ const sbtBuildPropertiesFile = path.join(sbtProjectDir, "build.properties")
3939
const sbtBuildSbtFile = path.join(workspaceRoot, "build.sbt")
4040
const languageServerArtifactFile = path.join(workspaceRoot, ".dotty-ide-artifact")
4141

42-
function isUnconfiguredProject() {
43-
return !( fs.existsSync(disableDottyIDEFile)
44-
|| fs.existsSync(sbtPluginFile)
45-
|| fs.existsSync(sbtBuildPropertiesFile)
46-
|| fs.existsSync(sbtBuildSbtFile)
42+
function isConfiguredProject() {
43+
return ( fs.existsSync(sbtPluginFile)
44+
|| fs.existsSync(sbtBuildPropertiesFile)
45+
|| fs.existsSync(sbtBuildSbtFile)
4746
)
4847
}
4948

@@ -81,9 +80,9 @@ export function activate(context: ExtensionContext) {
8180
}, false)
8281
})
8382

84-
} else {
83+
} else if (!fs.existsSync(disableDottyIDEFile)) {
8584
let configuredProject: Thenable<void> = Promise.resolve()
86-
if (isUnconfiguredProject()) {
85+
if (!isConfiguredProject()) {
8786
configuredProject = vscode.window.showInformationMessage(
8887
"This looks like an unconfigured Scala project. Would you like to start the Dotty IDE?",
8988
"Yes", "No"
@@ -220,7 +219,7 @@ function runLanguageServer(coursierPath: string, languageServerArtifactFile: str
220219

221220
function startNewSbtInstance(coursierPath: string) {
222221
fetchWithCoursier(coursierPath, sbtArtifact).then((sbtClasspath) => {
223-
sbtProcess = cpp.spawn("java", [
222+
sbtProcess = pcp.spawn("java", [
224223
"-Dsbt.log.noformat=true",
225224
"-classpath", sbtClasspath,
226225
"xsbt.boot.Boot"
@@ -265,7 +264,7 @@ function fetchWithCoursier(coursierPath: string, artifact: string, extra: string
265264
"-p",
266265
artifact
267266
].concat(extra)
268-
const coursierProc = cpp.spawn("java", args)
267+
const coursierProc = pcp.spawn("java", args)
269268

270269
let classPath = ""
271270

vscode-dotty/src/types.d.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)