Skip to content

Commit

Permalink
use uuid from package:uuid instead of from package:usage (flutter#161102
Browse files Browse the repository at this point in the history
)

- 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:
- flutter#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
  • Loading branch information
devoncarew authored Jan 7, 2025
1 parent bb4628e commit e30bf85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/flutter_tools/lib/src/compile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 ?? '')
Expand Down

0 comments on commit e30bf85

Please sign in to comment.