running-apps: update running-apps to use Duration.ago()#182172
running-apps: update running-apps to use Duration.ago()#182172jwren merged 4 commits intoflutter:masterfrom
Conversation
cd58e0c to
d6b3db4
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the running-apps command to utilize the Duration.ago() extension method for calculating and displaying the age of running applications. This change removes the custom processAge function and its associated tests, leading to cleaner and more maintainable code by leveraging an existing utility. The tests have been updated to reflect the new output format.
| final String platform = app.targetPlatform; | ||
| final String vmServiceUri = app.wsUri; | ||
| final String age = processAge(app.epoch, _systemClock); | ||
| final String age = _systemClock.now().difference(DateTime.fromMillisecondsSinceEpoch(app.epoch)).ago(); |
There was a problem hiding this comment.
The previous processAge function provided granular output for durations less than a minute (e.g., "1s"). The Duration.ago() extension, as currently implemented, will output "0 minutes ago" for any duration less than a minute. While using the Duration.ago() extension is good for consistency, this change reduces the precision and conciseness for very recent applications. Consider if the Duration.ago() extension should be modified to provide second-level granularity for durations under a minute, or if a different formatting approach is desired for this specific output to maintain the previous level of detail and conciseness (e.g., "1s", "59s"). This aligns with the "Optimize for readability" principle (Repository Style Guide, line 29).
There was a problem hiding this comment.
Ack, second precision is not important here.
d6b3db4 to
3275050
Compare
3275050 to
502dfeb
Compare
| test_api: 0.7.9 | ||
| typed_data: 1.4.0 | ||
| unified_analytics: 8.0.10 | ||
| unified_analytics: 8.0.11 |
There was a problem hiding this comment.
Is there any particular dependency that needed to be updated for this change? If not, I think we can just revert the pubspec related updates.
There was a problem hiding this comment.
@bkonyi I reverted the change to just that pubspec.yaml, but now have failures with the bots. Leaving them red so you can see. From the logs: ease run "flutter update-packages --force-upgrade --update-hashes" to update them correctly. The hash (fv45lk) does not match the expectation (nepob0).
There was a problem hiding this comment.
I'm just wondering how the pubspecs got updated in the first place. You shouldn't need to run flutter update-packages at all for the changes you made since they don't touch any dependencies.
In general, I only run flutter update-packages if I'm trying to pick up a new dependency for the PR I'm working on or if I'm trying to manually unblock a packages roll. It's not something that I need to do often :-)
I'd try rolling back all the pubspec and pubspec.lock changes and uploading that. As long as the parent commit was in a good state (it should have been), that should clear things up. If you rebased, it's possible something got messed up during conflict resolution and it might be worth reapplying your changes on top of master.
502dfeb to
1007b14
Compare
1007b14 to
c57a297
Compare
Roll Flutter from dad6f9d4107a to b31548feb941 (39 revisions) flutter/flutter@dad6f9d...b31548f 2026-02-25 [email protected] [web] Fix failure on Firefox 148 (flutter/flutter#182855) 2026-02-25 [email protected] Roll Fuchsia Linux SDK from KfPgw04T0OEADLJA5... to XI0Ax7fbtYE4XKYAQ... (flutter/flutter#182887) 2026-02-25 [email protected] Use AnimationStyle curve and reverseCurve in ModalBottomSheet animation (flutter/flutter#181403) 2026-02-25 [email protected] Roll Dart SDK from fd3dce5b6a4e to 5c57e75f1102 (9 revisions) (flutter/flutter#182801) 2026-02-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (#182697)" (flutter/flutter#182879) 2026-02-25 [email protected] Make sure that an AnimatedSlide doesn't crash in 0x0 environment (flutter/flutter#181535) 2026-02-24 [email protected] Reland Standardize on Test* widgets in *_tester.dart files (flutter/flutter#182632) 2026-02-24 [email protected] docs(Path): clarify that zero-length contours are excluded from computeMetrics (flutter/flutter#180165) 2026-02-24 [email protected] Fix typo in assert message (flutter/flutter#182843) 2026-02-24 [email protected] [win32] Fix overflow in TaskRunnerWindow. (flutter/flutter#182822) 2026-02-24 [email protected] feat: Add --no-uninstall flag to flutter test for integration tests (flutter/flutter#182714) 2026-02-24 [email protected] Rename noFrequencyBasedMinification to useFrequencyBasedMinification (flutter/flutter#182684) 2026-02-24 [email protected] [Impeller] Fix fail to render pixel buffer texture on Linux (flutter/flutter#181656) 2026-02-24 [email protected] Remove FlutterFramework app migration (flutter/flutter#182100) 2026-02-24 [email protected] Roll Packages from 12b43a1 to 062c8d4 (5 revisions) (flutter/flutter#182839) 2026-02-24 [email protected] [web] Run webparagraph tests in CI (flutter/flutter#182092) 2026-02-24 [email protected] Fix a race in EmbedderTest.CanSpecifyCustomUITaskRunner (flutter/flutter#182649) 2026-02-24 [email protected] flutter_tools: Use a super-parameter in several missed cases (flutter/flutter#182581) 2026-02-24 [email protected] Replace more references to `flutter/engine` with `flutter/flutter` (flutter/flutter#182654) 2026-02-24 [email protected] Carousel: Migration from Scrollable+Viewport to CustomScrollView (flutter/flutter#182475) 2026-02-24 [email protected] Refactor impellerc_main to better organize some of its logic (flutter/flutter#182783) 2026-02-24 [email protected] Remove unused `getPluginList ` (flutter/flutter#182660) 2026-02-24 [email protected] Refactor: Remove material from ticker provider test (flutter/flutter#181697) 2026-02-24 [email protected] Roll Skia from 26eebffe12bd to f44d7db68805 (3 revisions) (flutter/flutter#182821) 2026-02-24 [email protected] refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (flutter/flutter#182697) 2026-02-24 [email protected] Roll Skia from 7dad66aae75a to 26eebffe12bd (5 revisions) (flutter/flutter#182810) 2026-02-24 [email protected] Update roadmap for 2026 (flutter/flutter#182798) 2026-02-24 [email protected] Marks Windows tool_tests_commands_1_2 to be unflaky (flutter/flutter#179670) 2026-02-23 [email protected] [web] scroll iOS iframe text input into view (flutter/flutter#179759) 2026-02-23 [email protected] Fix textscaler clamp assertion error (flutter/flutter#181716) 2026-02-23 [email protected] Roll Skia from 9a5a3c92c336 to 7dad66aae75a (4 revisions) (flutter/flutter#182779) 2026-02-23 [email protected] Move more getters from userMessages class to the appropriate places (flutter/flutter#182656) 2026-02-23 [email protected] Manual roll Dart SDK from f8fac50475b8 to fd3dce5b6a4e (6 revisions) (flutter/flutter#182768) 2026-02-23 [email protected] Copy Flutter framework to Add to App FlutterPluginRgistrant (flutter/flutter#182523) 2026-02-23 [email protected] Add progress indicator to artifact downloads (flutter/flutter#181808) 2026-02-23 [email protected] Clarify batch release mode requirements (flutter/flutter#182228) 2026-02-23 [email protected] [web] Remove --disable-gpu from flutter chrome tests (flutter/flutter#182618) 2026-02-23 [email protected] running-apps: update running-apps to use Duration.ago() (flutter/flutter#182172) 2026-02-23 [email protected] Refactor bin/ shell scripts for better performance and safety (flutter/flutter#182674) 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. ...
Cleanup from #180098
#182155