-
Notifications
You must be signed in to change notification settings - Fork 29.7k
print traces when transforming an asset #146374
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
print traces when transforming an asset #146374
Conversation
|
Example of what this looks like (excerpt from running |
| } finally { | ||
| ErrorHandlingFileSystem.deleteIfExists(tempInputFile); | ||
| ErrorHandlingFileSystem.deleteIfExists(tempOutputFile); | ||
| logger.printTrace("Finished transforming asset at path '${asset.path}' (${stopwatch.elapsedMilliseconds}ms)"); |
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.
Can we move this line to right before the finally?
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
|
@andrewkolos what's the status on this PR? |
flutter/flutter@1a905d5...140edb9 2024-04-22 [email protected] Fixed few typos (flutter/flutter#147087) 2024-04-22 [email protected] Add Amir Panahandeh to AUTHORS (flutter/flutter#147052) 2024-04-22 [email protected] print traces when transforming an asset (flutter/flutter#146374) 2024-04-22 [email protected] Roll Packages from 88a3a56 to 01a32c4 (5 revisions) (flutter/flutter#147164) 2024-04-22 [email protected] Reland "Expose build mode in environment of asset transformer processes" (flutter/flutter#144958) 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],[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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
From flutter#143348 (comment): > before we ship, we should add a printTrace to the tool about each asset transformer we're invoking and the path/arguments we called it with I think this is a good idea since asset transformers can be arbitrary Dart programs�meaning that a lot can go wrong when running them. For example, they can hang indefinitely or perform some sort of I/O that later results in a tool crash. Knowing that asset transformation was involved when debugging a crash (or a slow/stuck `flutter build`) could be useful, so I think adding a `printTrace` or two is a good idea (or at least not a bad one).
flutter/flutter@1a905d5...140edb9 2024-04-22 [email protected] Fixed few typos (flutter/flutter#147087) 2024-04-22 [email protected] Add Amir Panahandeh to AUTHORS (flutter/flutter#147052) 2024-04-22 [email protected] print traces when transforming an asset (flutter/flutter#146374) 2024-04-22 [email protected] Roll Packages from 88a3a56 to 01a32c4 (5 revisions) (flutter/flutter#147164) 2024-04-22 [email protected] Reland "Expose build mode in environment of asset transformer processes" (flutter/flutter#144958) 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],[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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
From #143348 (comment):
I think this is a good idea since asset transformers can be arbitrary Dart programs—meaning that a lot can go wrong when running them. For example, they can hang indefinitely or perform some sort of I/O that later results in a tool crash. Knowing that asset transformation was involved when debugging a crash (or a slow/stuck
flutter build) could be useful, so I think adding aprintTraceor two is a good idea (or at least not a bad one).Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.