Skip to content
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

Properly report dart format errors #57206

Merged
merged 7 commits into from
Dec 16, 2024
Merged

Conversation

goderbauer
Copy link
Member

dart format can fail (e.g. if a file contains invalid dart code). Previously, those failures were swallowed. This change adds logic to properly print those failures to the terminal.

incorrect = completedJobs.where((WorkerJob job) => job.result.exitCode == 1);
final List<WorkerJob> incorrectJobs = incorrect = [];
for (final WorkerJob job in completedJobs) {
if ((job.result.exitCode == 1 && job.result.stderr.isNotEmpty) || job.result.exitCode > 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't the exit code also be negative?

Seems like you want job.result.exitCode != 0 && (job.result.stderr.isNotEmpty || job.result.exitCode != 1)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Thank you!

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@gspencergoog gspencergoog added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 16, 2024
@goderbauer goderbauer added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Dec 16, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 16, 2024
Copy link
Contributor

auto-submit bot commented Dec 16, 2024

auto label is removed for flutter/engine/57206, due to - The status or check suite Linux local_engine_builds has failed. Please fix the issues identified (or deflake) before re-applying this label.

@goderbauer goderbauer added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Dec 16, 2024
@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 16, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Dec 16, 2024
This applied the improvements from
flutter/engine#57206 to the flutter/flutter
version of that script (hopefully, we can deduplicate this soon with the
repo merge).
@auto-submit auto-submit bot merged commit 1d2eb3f into flutter:main Dec 16, 2024
31 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 17, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Dec 17, 2024
…160396)

flutter/engine@4944aeb...1d2eb3f

2024-12-16 [email protected] Properly report `dart format` errors
(flutter/engine#57206)
2024-12-16 [email protected] Roll Skia from 7fc6934b2034 to
2c5159518cf2 (1 revision) (flutter/engine#57229)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] on the revert to
ensure that a human
is aware of the problem.

To file a bug in Flutter:
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
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
`dart format` can fail (e.g. if a file contains invalid dart code). Previously, those failures were swallowed. This change adds logic to properly print those failures to the terminal.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants