From bdf87db3d135d4776f4b4a0b02cd397d225adce8 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:51:17 -0700 Subject: [PATCH] Clear the G3 relative URI map with the other URI maps --- dwds/lib/src/utilities/dart_uri.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 5b18d0fab..e6bfe8433 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -133,6 +133,11 @@ class DartUri { /// All of the known libraries, indexed by their absolute file URL. static final Map _resolvedUriToUri = {}; + /// Returns a resolved path for a g3-relative URI. + /// + /// This map is empty if not a google3 app. + static final Map _g3RelativeUriToResolvedUri = {}; + /// Returns package, app, or dart uri for a resolved path. static String? toPackageUri(String uri) { final packageUri = _resolvedUriToUri[uri]; @@ -152,11 +157,6 @@ class DartUri { /// Returns resolved path for a package, app, or dart uri. static String? toResolvedUri(String uri) => _uriToResolvedUri[uri]; - /// Returns a resolved path for a g3-relative URI. - /// - /// This map is empty if not a google3 app. - static final Map _g3RelativeUriToResolvedUri = {}; - /// The directory in which we're running. /// /// We store this here because for tests we may want to act as if we're @@ -178,6 +178,7 @@ class DartUri { _packageConfig = null; _resolvedUriToUri.clear(); _uriToResolvedUri.clear(); + _g3RelativeUriToResolvedUri.clear(); } /// Record all of the libraries, indexed by their absolute file: URI.