Repository navigation
[flutter_tools] Remove globals usage from linux/native_assets.dart - #193648
Conversation
Use cmakeDirectory.fileSystem instead of globals.fs in cCompilerConfigLinux and migrate cCompilerConfigLinux unit tests to testWithoutContext.
There was a problem hiding this comment.
Code Review
This pull request refactors cCompilerConfigLinux to use the FileSystem from the provided cmakeDirectory instead of the global globals.fs instance. Additionally, the associated tests in native_assets_test.dart are migrated from testUsingContext to testWithoutContext, and a new _ThrowingResolveDirectory class is introduced to support the updated test setup. There are no review comments to address, and I have no feedback to provide.
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
There was a problem hiding this comment.
Code Review
This pull request refactors the Linux native assets compilation configuration to use a local FileSystem instance instead of the global globals.fs. Accordingly, the associated tests are migrated from testUsingContext to testWithoutContext. Feedback suggests simplifying the newly added _ThrowingResolveDirectory helper class by removing redundant method overrides that are already provided by the ForwardingDirectory mixin.
… in Linux native_assets_test
…lutter#193648) Migrates Linux native assets host utilities (linux/native_assets.dart) away from globals.dart to explicit dependency injection. Part of flutter#188471 ## 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 `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing.
Migrates Linux native assets host utilities (linux/native_assets.dart) away from globals.dart to explicit dependency injection.
Part of #188471
Pre-launch Checklist
///).