Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions server/src/incrementalCompilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,23 @@ function triggerIncrementalCompilationOfFile(
if (debug()) console.log("Did not find open project for " + filePath);
return;
}
const workspaceRootPath = projectRootPath
? utils.findProjectRootOfFile(projectRootPath, true)
: null;

const projectRewatchLockfile = path.resolve(
projectRootPath,
c.rewatchLockPartialPath
);

let foundRewatchLockfileInProjectRoot = false;
if (fs.existsSync(projectRewatchLockfile)) {
foundRewatchLockfileInProjectRoot = true;
}

// if we find a rewatch.lock in the project root, it's a compilation of a local package
// in the workspace.
const workspaceRootPath =
projectRootPath && !foundRewatchLockfileInProjectRoot
? utils.findProjectRootOfFile(projectRootPath, true)
: null;

const bscBinaryLocation = project.bscBinaryLocation;
if (bscBinaryLocation == null) {
Expand Down