Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Dec 12, 2024

We are about to dart format all the Dart code in the repo, which line-breaks some of our imports.

This PR updates sdk_rewriter.dart to support line-broken imports.

@yjbanov yjbanov requested a review from goderbauer December 12, 2024 23:00
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Dec 12, 2024
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@yjbanov yjbanov changed the title [web] allows imports to line-break [web] allow imports to line-break Dec 12, 2024
@yjbanov yjbanov force-pushed the allow-imports-to-line-break branch from 045cd24 to 81816cc Compare December 13, 2024 00:20
@goderbauer
Copy link
Member

Looks like something is still failing with the line breaks…

@mdebbar
Copy link
Contributor

mdebbar commented Dec 13, 2024

@yjbanov I think we need to remove this restriction now:

if (!isProperlyFormattedImport) {
violations.add('on line $lineNumber: import is broken up into multiple lines: $line');
continue;
}

(this is what's causing the CI failure)

@yjbanov
Copy link
Contributor Author

yjbanov commented Dec 13, 2024

Yep, fixed.

@yjbanov yjbanov added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 13, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Dec 13, 2024

auto label is removed for flutter/engine/57170, 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.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 13, 2024
@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 13, 2024
@auto-submit auto-submit bot merged commit 8e3ac47 into flutter:main Dec 13, 2024
34 checks passed
// Remove library directives.
AllReplacer(RegExp(r'\nlibrary .+;'), ''),
// Remove imports/exports from all part files.
AllReplacer(RegExp(r"\nimport '.+'\n\s*if \(dart\.library\..*\) '.*';"), ''),
Copy link
Member

Choose a reason for hiding this comment

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

Not that it matters too much, but I'd do a simpler regex to handle both import cases?

https://regexr.com/8a1l1

?

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Dec 14, 2024
…160290)

flutter/engine@f0ff4f2...c4e3cc2

2024-12-13 [email protected] [skwasm] Fix
implementation of SkwasmPath.relativeLineTo (flutter/engine#57201)
2024-12-13 [email protected] Made compilation
error colors come through et. (flutter/engine#57174)
2024-12-13 [email protected] Roll Fuchsia Linux SDK from
iWMEbVYaNdH8RJmXZ... to iYz_WkWk1uPr8BLSZ... (flutter/engine#57198)
2024-12-13 [email protected] [web] allow imports to line-break
(flutter/engine#57170)
2024-12-13 [email protected] [ios]limit web
view not tappable workaround to a limited depth (flutter/engine#57193)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from iWMEbVYaNdH8 to iYz_WkWk1uPr

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
We are about to `dart format` all the Dart code in the repo, which line-breaks some of our imports.

This PR updates `sdk_rewriter.dart` to support line-broken imports.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants