From e30bf8523123eb3f0bc363837961eb96fed3f968 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 7 Jan 2025 09:33:23 -0800 Subject: [PATCH] use uuid from package:uuid instead of from package:usage (#161102) - use uuid from package:uuid instead of from package:usage `package:usage` is discontinued and no longer maintained; this removes one use of it from the flutter_tools codebase. *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* See also: - https://github.com/flutter/flutter/pull/152692 - https://github.com/dart-archive/usage ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --- packages/flutter_tools/lib/src/compile.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index 0a5ae557d8..48a02f91f1 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart @@ -8,7 +8,7 @@ import 'dart:typed_data'; import 'package:meta/meta.dart'; import 'package:package_config/package_config.dart'; import 'package:process/process.dart'; -import 'package:usage/uuid/uuid.dart'; +import 'package:uuid/v4.dart'; import 'artifacts.dart'; import 'base/common.dart'; @@ -753,7 +753,7 @@ class DefaultResidentCompiler implements ResidentCompiler { nativeAssetsUri: nativeAssets, ); } - final String inputKey = Uuid().generateV4(); + final String inputKey = const UuidV4().generate(); if (nativeAssets != null && nativeAssets.isNotEmpty) { server.stdin.writeln('native-assets $nativeAssets'); @@ -953,7 +953,7 @@ class DefaultResidentCompiler implements ResidentCompiler { return null; } - final String inputKey = Uuid().generateV4(); + final String inputKey = const UuidV4().generate(); server.stdin ..writeln('compile-expression $inputKey') ..writeln(request.expression); @@ -1016,7 +1016,7 @@ class DefaultResidentCompiler implements ResidentCompiler { return null; } - final String inputKey = Uuid().generateV4(); + final String inputKey = const UuidV4().generate(); server.stdin ..writeln('compile-expression-to-js $inputKey') ..writeln(request.libraryUri ?? '')