From bcafd7cb8c5639b5673da1069471a09d40b9d7b5 Mon Sep 17 00:00:00 2001 From: zodern Date: Thu, 21 Apr 2022 19:05:59 -0500 Subject: [PATCH 1/2] Fix outdated comment for readAndWatchFileWithHash --- tools/fs/watch.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/fs/watch.ts b/tools/fs/watch.ts index c9d39f23c5..4d87f26d69 100644 --- a/tools/fs/watch.ts +++ b/tools/fs/watch.ts @@ -843,10 +843,6 @@ export function readAndWatchDirectory( // Calculating the sha hash can be expensive for large files. By // returning the calculated hash along with the file contents, the // hash doesn't need to be calculated again for static files. -// -// We only calculate the hash if needed here, so callers must not -// *rely* on the hash being returned; merely that if the hash is -// present, it is the correct hash of the contents. export function readAndWatchFileWithHash(watchSet: WatchSet, absPath: string) { const result: { contents: string | Buffer | null; From 63b8aa3a507078f734e86fd73077b8b7a587dbec Mon Sep 17 00:00:00 2001 From: zodern Date: Thu, 21 Apr 2022 19:14:47 -0500 Subject: [PATCH 2/2] Fix compilers adding os paths to watchset --- tools/isobuild/compiler-plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index c544db83ee..3b9e3baef1 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -304,7 +304,7 @@ class InputFile extends buildPluginModule.InputFile { const sourceBatch = this._resourceSlot.packageSourceBatch; return readAndWatchFileWithHash( sourceBatch.unibuild.watchSet, - files.convertToOSPath(path), + files.convertToPosixPath(path), ); }