Skip to content

Conversation

@andrewkolos
Copy link
Contributor

@andrewkolos andrewkolos commented Jun 25, 2024

Resolves #150736

FYI I plan to cherry-pick this

Pre-launch Checklist

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

@andrewkolos andrewkolos added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 25, 2024
Comment on lines +89 to +90
// This check will falsely match "3/ESRCH: No such process" on Linux/macOS,
// but this should be fine since this code should never come up here.
Copy link
Contributor Author

@andrewkolos andrewkolos Jun 25, 2024

Choose a reason for hiding this comment

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

If this is a bit too smelly for your taste, please read #150736 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you say "this code should never come up here"? Are you saying that we should never hit a "no such process" error on unix-like operating systems when calling deleteIfExists?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(We talked about this in-person. I'm commenting here for posterity's sake). Yes, that's my hope. I'm assuming 3/ESRCH is never set by a file op. I'm assuming this code is used by Linux utilities that act on processes rather than files.

@andrewkolos andrewkolos changed the title make ErrorHandlingFileSystem.deleteIfExists catch error code 3 (ERROR_PATH_NOT_FOUND on Windows) [tool] make ErrorHandlingFileSystem.deleteIfExists catch error code 3 (ERROR_PATH_NOT_FOUND on Windows) Jun 25, 2024
@andrewkolos andrewkolos marked this pull request as ready for review June 25, 2024 00:04
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

@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 25, 2024
@auto-submit

This comment was marked as outdated.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 25, 2024
@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 25, 2024
@auto-submit auto-submit bot merged commit d520f07 into flutter:master Jun 25, 2024
@andrewkolos andrewkolos added the cp: stable cherry pick this pull request to stable release candidate branch label Jun 25, 2024
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jun 25, 2024
… 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter#150741)

Resolves flutter#150736

FYI I plan to cherry-pick this
hello-coder-xu added a commit to hello-coder-xu/flutter that referenced this pull request Jun 26, 2024
* master: (23 commits)
  Roll pub packages (flutter#150810)
  Remove reference to `MaterialApp` and `showCupertinoModalPopup` from `CupertinoAlertDialog` (flutter#150725)
  Read `AndroidManifest.xml` and emit `manifest-impeller-(enabled|disabled)` analytics (flutter#150791)
  [flutter_tools] Shut down Chromium cleanly using a command sent through the debug protocol (flutter#150645)
  Reland fix inputDecorator hint color on M3 (flutter#150278)
  Roll Flutter Engine from 62e0b5f9c340 to 94023d711db3 (7 revisions) (flutter#150797)
  Fix collapsed InputDecorator minimum height (flutter#150770)
  Add more warm up frame docs (flutter#150464)
  Roll pub packages (flutter#150739)
  Add `focusNode`, `focusColor`, `onFocusChange`, `autofocus` to `CupertinoButton` (flutter#150721)
  Document RenderObject._relayoutBoundary and its invariant; small refactors (flutter#150527)
  Roll Flutter Engine from 6313b1e5afd7 to 62e0b5f9c340 (1 revision) (flutter#150790)
  fix a typo (flutter#150682)
  Fix link in RenderObjectWidget doc comment (flutter#150600)
  Roll Flutter Engine from fbd92055f3a6 to 6313b1e5afd7 (1 revision) (flutter#150781)
  [tool] make `ErrorHandlingFileSystem.deleteIfExists` catch error code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter#150741)
  Roll Packages from 711b4ac to 03f5f6d (21 revisions) (flutter#150779)
  Roll Flutter Engine from afa7ce19bca8 to fbd92055f3a6 (1 revision) (flutter#150777)
  Reland Add tests for form_text_field.1.dart (flutter#150481) (flutter#150696) (flutter#150750)
  Add an example for CupertinoPopupSurface (flutter#150357)
  ...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2024
@andrewkolos andrewkolos deleted the catch-error-3-in-deleteIfExists branch July 22, 2024 04:41
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: stable cherry pick this pull request to stable release candidate branch tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tool] consider making ErrorHandlingFileSystem.deleteIfExists catch system error code ERROR_PATH_NOT_FOUND (3) on Windows

2 participants