Skip to content

Commit 76e050c

Browse files
authored
Clear the map of relative URIs on DartUri.clear()
1 parent 38a17ce commit 76e050c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

dwds/lib/src/utilities/dart_uri.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ class DartUri {
133133
/// All of the known libraries, indexed by their absolute file URL.
134134
static final Map<String, String> _resolvedUriToUri = {};
135135

136+
/// Returns a resolved path for a g3-relative URI.
137+
///
138+
/// This map is empty if not a google3 app.
139+
static final Map<String, String> _g3RelativeUriToResolvedUri = {};
140+
136141
/// Returns package, app, or dart uri for a resolved path.
137142
static String? toPackageUri(String uri) {
138143
final packageUri = _resolvedUriToUri[uri];
@@ -152,11 +157,6 @@ class DartUri {
152157
/// Returns resolved path for a package, app, or dart uri.
153158
static String? toResolvedUri(String uri) => _uriToResolvedUri[uri];
154159

155-
/// Returns a resolved path for a g3-relative URI.
156-
///
157-
/// This map is empty if not a google3 app.
158-
static final Map<String, String> _g3RelativeUriToResolvedUri = {};
159-
160160
/// The directory in which we're running.
161161
///
162162
/// We store this here because for tests we may want to act as if we're
@@ -178,6 +178,7 @@ class DartUri {
178178
_packageConfig = null;
179179
_resolvedUriToUri.clear();
180180
_uriToResolvedUri.clear();
181+
_g3RelativeUriToResolvedUri.clear();
181182
}
182183

183184
/// Record all of the libraries, indexed by their absolute file: URI.

0 commit comments

Comments
 (0)