Skip to content

[flutter_tools] Remove globals usage from linux/native_assets.dart - #193648

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
bkonyi:di/27g-native-assets-host
Oct 8, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
bkonyi:di/27g-native-assets-host

Conversation

@bkonyi

@bkonyi bkonyi commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Migrates Linux native assets host utilities (linux/native_assets.dart) away from globals.dart to explicit dependency injection.

Part of #188471

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • 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].
  • All existing and new tests are passing.

Use cmakeDirectory.fileSystem instead of globals.fs in cCompilerConfigLinux and migrate cCompilerConfigLinux unit tests to testWithoutContext.
@bkonyi
bkonyi requested a review from a team as a code owner October 1, 2026 15:07
@bkonyi bkonyi added tool Affects the "flutter" command-line tool. See also t: labels. CICD Run CI/CD labels Oct 1, 2026
@github-actions github-actions Bot added a: desktop Running on desktop team-linux Owned by the Linux platform team labels Oct 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bkonyi
bkonyi marked this pull request as draft October 1, 2026 15:23
@flutter-dashboard

Copy link
Copy Markdown

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 package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@bkonyi
bkonyi marked this pull request as ready for review October 2, 2026 16:52

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bkonyi
bkonyi requested review from chingjun and removed request for a team October 8, 2026 01:38
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD team-linux Owned by the Linux platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants