-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[tool] make ErrorHandlingFileSystem.deleteIfExists catch error code 3 (ERROR_PATH_NOT_FOUND on Windows)
#150741
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
[tool] make ErrorHandlingFileSystem.deleteIfExists catch error code 3 (ERROR_PATH_NOT_FOUND on Windows)
#150741
Conversation
| // 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. |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
ErrorHandlingFileSystem.deleteIfExists catch error code 3 (ERROR_PATH_NOT_FOUND on Windows)ErrorHandlingFileSystem.deleteIfExists catch error code 3 (ERROR_PATH_NOT_FOUND on Windows)
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This comment was marked as outdated.
This comment was marked as outdated.
… 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter#150741) Resolves flutter#150736 FYI I plan to cherry-pick this
* 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) ...
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
…ror code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter/flutter#150741)
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.