Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 995b1c9

Browse files
gameboxcommit-bot@chromium.org
authored andcommitted
FE Server shouldn't try to invalidate other file schemes
When trying to invalidate files when using a multi- root file system, if a .dill file that is being used to initialize an incremental compiler contains both files with a custom marker scheme, as well as an internal one like `org-dartlang-sdk`, it will throw when it encounters the internal scheme. This commit remedies the issue, but this is my first CL to the SDK, I'm not sure if this is the best approach. Other approaches may be: - Ignore dartlang internal file schemes only - Catch errors from entity.exists instead of filtering And I'm sure there are many others. Change-Id: Idc7aba4b41eb5cf7f66db492f0ea6e26252779c5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94680 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
1 parent 975cc65 commit 995b1c9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/vm/lib/frontend_server.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,15 @@ class FrontendCompiler implements CompilerInterface {
431431
// Ignore errors that might be caused by non-file uris.
432432
continue nextUri;
433433
}
434-
if (!await entity.exists()) {
434+
435+
bool exists;
436+
try {
437+
exists = await entity.exists();
438+
} catch (e) {
439+
exists = false;
440+
}
441+
442+
if (!exists) {
435443
_generator.invalidate(uri);
436444
continue nextUri;
437445
}

0 commit comments

Comments
 (0)