Skip to content

Commit 9bc9e48

Browse files
author
Dart CI
committed
Version 2.13.0-113.0.dev
Merge commit '08cb8bebe16b6b6f04eb99742ef8decef73a2f10' into 'dev'
2 parents bb38200 + 08cb8be commit 9bc9e48

2 files changed

Lines changed: 10 additions & 16 deletions

File tree

pkg/analyzer/lib/src/workspace/bazel.dart

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,9 @@ class BazelWorkspace extends Workspace
446446
return writableFile;
447447
}
448448
// READONLY
449+
var readonly = this.readonly;
449450
if (readonly != null) {
450-
File file = provider.getFile(context.join(readonly!, relative));
451+
File file = provider.getFile(context.join(readonly, relative));
451452
if (file.exists) {
452453
return file;
453454
}
@@ -573,8 +574,9 @@ class BazelWorkspace extends Workspace
573574
}
574575
}
575576
// READONLY
577+
var readonly = this.readonly;
576578
if (readonly != null) {
577-
if (context.isWithin(readonly!, p)) {
579+
if (context.isWithin(readonly, p)) {
578580
return context.relative(p, from: readonly);
579581
}
580582
}
@@ -751,21 +753,13 @@ class BazelWorkspacePackage extends WorkspacePackage {
751753

752754
@override
753755
bool contains(Source source) {
754-
if (source.uri.isScheme('package')) {
755-
return source.uri.toString().startsWith(_uriPrefix);
756-
}
757-
var filePath = source.fullName;
758-
if (workspace.findFile(filePath) == null) {
759-
return false;
760-
}
761-
if (!workspace.provider.pathContext.isWithin(root, filePath)) {
762-
return false;
756+
var uri = source.uri;
757+
if (uri.isScheme('package')) {
758+
return uri.toString().startsWith(_uriPrefix);
763759
}
764760

765-
// Just because [filePath] is within [root] does not mean it is in this
766-
// package; it could be in a "subpackage." Must go through the work of
767-
// learning exactly which package [filePath] is contained in.
768-
return workspace.findPackageFor(filePath)!.root == root;
761+
var path = source.fullName;
762+
return workspace.findPackageFor(path)?.root == root;
769763
}
770764

771765
@override

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CHANNEL dev
2727
MAJOR 2
2828
MINOR 13
2929
PATCH 0
30-
PRERELEASE 112
30+
PRERELEASE 113
3131
PRERELEASE_PATCH 0

0 commit comments

Comments
 (0)