Skip to content

Wrap ShutdownHook calls to avoid crashing the tool #171917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 21, 2025

Conversation

matanlurey
Copy link
Contributor

Closes #57351.

@matanlurey matanlurey requested a review from bkonyi July 9, 2025 21:41
@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. d: docs/ flutter/flutter/docs, for contributors labels Jul 9, 2025
@github-actions github-actions bot removed the d: docs/ flutter/flutter/docs, for contributors label Jul 9, 2025
for (final ShutdownHook shutdownHook in registeredHooks) {
try {
final Future<void> future = asyncGuard<void>(
() async => shutdownHook(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this just be shutdownHook since ShutdownHook is just FutureOr<void> Function()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because asyncGuard requires Future<T> and shutdownHook is FutureOr<>.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 17, 2025
Copy link
Contributor

auto-submit bot commented Jul 17, 2025

autosubmit label was removed for flutter/flutter/171917, because - The status or check suite Linux analyzer_benchmark has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 17, 2025
@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 17, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 17, 2025
Copy link
Contributor

auto-submit bot commented Jul 17, 2025

autosubmit label was removed for flutter/flutter/171917, because - The status or check suite Linux tool_integration_tests_1_7 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 21, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 21, 2025
Copy link
Contributor

auto-submit bot commented Jul 21, 2025

autosubmit label was removed for flutter/flutter/171917, because Pull request flutter/flutter/171917 is not in a mergeable state.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 21, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 21, 2025
Copy link
Contributor

auto-submit bot commented Jul 21, 2025

autosubmit label was removed for flutter/flutter/171917, because - The status or check suite Mac tool_tests_general has failed. Please fix the issues identified (or deflake) before re-applying this label.

  • The status or check suite Linux_tool-tests-general has failed. Please fix the issues identified (or deflake) before re-applying this label.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 21, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jul 21, 2025
Merged via the queue into flutter:master with commit 8527604 Jul 21, 2025
140 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 21, 2025
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.

Shutdown hooks shouldn't crash the tool
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy