Skip to content

Commit 231cd81

Browse files
committed
Address review comments
1 parent 7bcf514 commit 231cd81

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dwds/lib/src/utilities/dart_uri.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ class DartUri {
172172

173173
static set currentDirectory(String newDir) {
174174
_currentDirectory = newDir;
175-
_currentDirectoryUri = '${p.toUri(newDir)}';
175+
_currentDirectoryUri = p.toUri(newDir).toString();
176176
}
177177

178-
static String _currentDirectoryUri = '${p.toUri(currentDirectory)}';
178+
static String _currentDirectoryUri = p.toUri(currentDirectory).toString();
179179

180180
/// The current directory as a file: Uri, saved in a field to avoid
181181
/// re-computing.

dwds/test/fixtures/project.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ class TestProject {
179179
if (copiedPackageDirectories.contains(packageDirectory)) return;
180180
final currentPath = absolutePath(pathFromFixtures: packageDirectory);
181181
final newPath = p.join(tempDirectory.absolute.path, packageDirectory);
182-
await Directory(newPath).create();
183-
await copyPath(currentPath, newPath);
182+
Directory(newPath).createSync();
183+
copyPathSync(currentPath, newPath);
184184
copiedPackageDirectories.add(packageDirectory);
185185
final pubspec = Pubspec.parse(
186-
await File(p.join(currentPath, 'pubspec.yaml')).readAsString(),
186+
File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(),
187187
);
188188
for (final dependency in pubspec.dependencies.values) {
189189
if (dependency is PathDependency) {
@@ -225,9 +225,9 @@ class TestProject {
225225
final systemTempDir = Directory(
226226
// Resolve symbolic links as build_daemon tests rely on paths matching
227227
// between the client and the daemon.
228-
await Directory.systemTemp.resolveSymbolicLinks(),
228+
Directory.systemTemp.resolveSymbolicLinksSync(),
229229
);
230-
_fixturesCopy = await systemTempDir.createTemp();
230+
_fixturesCopy = systemTempDir.createTempSync();
231231
await _copyPackageAndPathDependenciesIntoTempDirectory(
232232
_fixturesCopy,
233233
packageDirectory,
@@ -238,12 +238,12 @@ class TestProject {
238238
/// Delete the copy of the project.
239239
Future<void> tearDown() async {
240240
try {
241-
await _fixturesCopy.delete(recursive: true);
241+
_fixturesCopy.deleteSync(recursive: true);
242242
} on FileSystemException catch (_) {
243243
// On Windows, the build daemon process might still be accessing the
244244
// working directory, so wait a second and then try again.
245245
await Future.delayed(const Duration(seconds: 1));
246-
await _fixturesCopy.delete(recursive: true);
246+
_fixturesCopy.deleteSync(recursive: true);
247247
}
248248
}
249249

0 commit comments

Comments
 (0)