Skip to content

Commit c51eaf6

Browse files
committed
Tweak some names
1 parent 1beaaf8 commit c51eaf6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

server/src/constants.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@ import * as path from "path";
33
// See https://microsoft.github.io/language-server-protocol/specification Abstract Message
44
// version is fixed to 2.0
55
export let jsonrpcVersion = "2.0";
6-
export let bscPartialPath = path.join(
6+
export let bscExePartialPath = path.join(
77
"node_modules",
88
"bs-platform",
99
process.platform,
1010
"bsc.exe"
1111
);
12-
1312
export let bscNodePartialPath = path.join("node_modules", ".bin", "bsc");
1413

1514
// can't use the native bsb since we might need the watcher -w flag, which is only in the js wrapper
1615
// export let bsbPartialPath = path.join('node_modules', 'bs-platform', process.platform, 'bsb.exe');
17-
export let bsbPartialPath = path.join("node_modules", ".bin", "bsb");
16+
export let bsbNodePartialPath = path.join("node_modules", ".bin", "bsb");
1817
export let bsbLock = ".bsb.lock";
1918
export let bsconfigPartialPath = "bsconfig.json";
2019
export let compilerLogPartialPath = path.join("lib", "bs", ".compiler.log");

server/src/server.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ let openedFile = (fileUri: string, fileContent: string) => {
141141
// because otherwise the diagnostics info we'll display might be stale
142142
let bsbLockPath = path.join(projectRootPath, c.bsbLock);
143143
if (firstOpenFileOfProject && !fs.existsSync(bsbLockPath)) {
144-
let bsbPath = path.join(projectRootPath, c.bsbPartialPath);
144+
let bsbPath = path.join(projectRootPath, c.bsbNodePartialPath);
145145
// TODO: sometime stale .bsb.lock dangling. bsb -w knows .bsb.lock is
146146
// stale. Use that logic
147147
// TODO: close watcher when lang-server shuts down
@@ -426,7 +426,7 @@ process.on("message", (msg: m.Message) => {
426426
process.send!(response);
427427
} else {
428428
let bscExists = false;
429-
let bscPath = path.join(projectRootPath, c.bscPartialPath);
429+
let bscPath = path.join(projectRootPath, c.bscExePartialPath);
430430
bscExists = fs.existsSync(bscPath);
431431
if (!bscExists) {
432432
// In certain cases the native bsc binaries might be put in an unknown location
@@ -510,7 +510,7 @@ process.on("message", (msg: m.Message) => {
510510
) {
511511
let msg_ = msg.result as clientSentBuildAction;
512512
let projectRootPath = msg_.projectRootPath;
513-
let bsbPath = path.join(projectRootPath, c.bsbPartialPath);
513+
let bsbPath = path.join(projectRootPath, c.bsbNodePartialPath);
514514
// TODO: sometime stale .bsb.lock dangling
515515
// TODO: close watcher when lang-server shuts down
516516
if (fs.existsSync(bsbPath)) {

0 commit comments

Comments
 (0)