Skip to content

Conversation

@sstrickl
Copy link
Contributor

@sstrickl sstrickl commented May 25, 2023

This PR adds uses of the --target-os command line argument when building kernel sources for precompiled applications for supported target operating systems. The Dart CFE then:

  • treats Platform.operatingSystem as if it were defined as the constant string provided as an argument to the flag,
  • treats Platform.pathSeparator as the appropriate separator for that operating system,
  • attempts to constant evaluate the initializer for any field annotated with the vm:platform-const pragma, and
  • attempts to constant evaluate all calls to a method annotated with the vm:platform-const pragma.

The vm:platform-const pragma can appear in either library or user code. If the attempt to constant evaluate the field initializer or method call fails, then an error is thrown at kernel compilation time.

Addresses #14233.

The tests in packages/flutter_tools/test/general.shard/build_system/targets/common_test.dart have been adjusted properly to account for the new passed command line arguments.

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.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 25, 2023
@github-actions github-actions bot removed the tool Affects the "flutter" command-line tool. See also t: labels. label May 25, 2023
@sstrickl sstrickl force-pushed the target-os branch 2 times, most recently from 1036412 to 280d6e1 Compare May 26, 2023 13:16
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 26, 2023
@sstrickl sstrickl marked this pull request as ready for review May 26, 2023 14:05
@github-actions github-actions bot removed the tool Affects the "flutter" command-line tool. See also t: labels. label May 31, 2023
@christopherfujino
Copy link
Contributor

@christopherfujino ptal

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM, this is cool!

@goderbauer goderbauer added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 1, 2023
@mkustermann
Copy link
Member

Landing on @sstrickl 's behalf.

@mkustermann mkustermann merged commit 840d7dd into flutter:master Jun 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 8, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 8, 2023
flutter/flutter@8a5c22e...6e254a3

2023-06-08 [email protected] [labeler] Set sync labels to false to stop removing labels (flutter/flutter#128446)
2023-06-08 [email protected] Update Chrome version for testing (flutter/flutter#128447)
2023-06-08 [email protected] Revert "Redo make inspector weakly referencing the inspected objects." (flutter/flutter#128506)
2023-06-08 [email protected] Use `--target-os` for appropriate precompiled targets. (flutter/flutter#127567)
2023-06-08 [email protected] Redo make inspector weakly referencing the inspected objects. (flutter/flutter#128471)
2023-06-07 [email protected] Roll Flutter Engine from 1089ce6874cf to a5f7d5d75ff2 (11 revisions) (flutter/flutter#128473)
2023-06-07 [email protected] Disable context menu (flutter/flutter#128365)
2023-06-07 [email protected] Adds vmservices to retrieve android applink settings (flutter/flutter#125998)
2023-06-07 [email protected] Roll Flutter Engine from 4f4486b00be2 to 1089ce6874cf (20 revisions) (flutter/flutter#128460)
2023-06-07 [email protected] Fix typos 'wether' -> 'whether' (flutter/flutter#128392)
2023-06-07 [email protected] Roll engine, patch expression evaluation (flutter/flutter#128255)
2023-06-07 [email protected] Roll Packages from da72219 to a84b2c2 (1 revision) (flutter/flutter#128444)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants