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].

<!-- Links -->
[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
This commit is contained in:
Devon Carew
2025-01-07 09:33:23 -08:00
committed by GitHub
parent bb4628e0f0
commit e30bf85231

View File

@@ -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 ?? '')