Skip to content

Conversation

@AlexV525
Copy link
Member

@AlexV525 AlexV525 commented Jul 25, 2023

Fixes #128932.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 25, 2023
@AlexV525 AlexV525 marked this pull request as ready for review July 25, 2023 09:30
Comment on lines 664 to 669
final List<File> files = directory
.listSync()
.whereType<File>()
.where((File e) => filenameRE.hasMatch(e.path))
.toList()
..sort(sortFilesByPath);
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some spacing issues here and we should also add a comment to clarify why we need sort.

Suggested change
final List<File> files = directory
.listSync()
.whereType<File>()
.where((File e) => filenameRE.hasMatch(e.path))
.toList()
..sort(sortFilesByPath);
// We require the list of files to be sorted so that "languageToLocales[bundle.locale.languageCode]"
// is not null by the time we handle locales with country codes.
final List<File> files = directory
.listSync()
.whereType<File>()
.where((File e) => filenameRE.hasMatch(e.path))
.toList()
..sort(sortFilesByPath);

Copy link
Member Author

Choose a reason for hiding this comment

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

The spacing should be correct, you may run dart format to check the result.

Copy link
Member Author

Choose a reason for hiding this comment

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

Comments are added.

Copy link
Contributor

Choose a reason for hiding this comment

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

you may run dart format to check the result.

Hi @AlexV525, thanks for contributing. The flutter/flutter repo does not use dart format. The formatting used in this repo is covered in detail in the flutter style guide.

Copy link
Contributor

Choose a reason for hiding this comment

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

The spacing should be correct, you may run dart format to check the result.

As @Piinks said, flutter doesn't use dart format and typically we have no instance of extra four space indents following a line. Two space indenting each line after the files variable declaration is what we usually do.

Copy link
Member Author

@AlexV525 AlexV525 Jul 27, 2023

Choose a reason for hiding this comment

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

For the record, these are what I've found in the repo:

final List<String> sortedList = values.entries
.map((MapEntry<String, Object> e) => '${e.key}: ${e.value};')
.toList()
..sort();

final List<String> localSegments = entityName.split('/')
..removeLast();

Our style guide wasn't specific about how cascade notations should indent after instance callers or how many indents should instace callers take before a cascade operator. For me, regardless of dart format, it makes me quickly identify what variable the cascade is targeting.

Though I don't have a strong opinion about this, but if we suggest this, we should put it into the style guide too.

Updated.

@AlexV525 AlexV525 requested a review from thkim1011 July 27, 2023 01:05
Copy link
Contributor

@thkim1011 thkim1011 left a comment

Choose a reason for hiding this comment

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

LGTM.

@thkim1011 thkim1011 added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 31, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 31, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 31, 2023

auto label is removed for flutter/flutter, pr: 131242, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@AlexV525 AlexV525 added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 1, 2023
@auto-submit auto-submit bot merged commit f2db93d into flutter:master Aug 1, 2023
@AlexV525 AlexV525 deleted the fix/handle-empty-arb branch August 1, 2023 01:28
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 2, 2023
vashworth pushed a commit to vashworth/flutter that referenced this pull request Aug 2, 2023
camsim99 pushed a commit to flutter/packages that referenced this pull request Aug 2, 2023
Roll Flutter from 1d59196 to b3f99ff (32 revisions)

flutter/flutter@1d59196...b3f99ff

2023-08-02 [email protected] Fix reentrancy with WidgetBindingObserver
callbacks (flutter/flutter#131774)
2023-08-02 [email protected] Update .ci.yaml
to add new shard to prevent timeouts (flutter/flutter#131712)
2023-08-02 [email protected] Fix flex methods for min and max column
widths (flutter/flutter#131724)
2023-08-02 [email protected] Manual roll Flutter Engine
from 9dae7b708bda to d6b962d0e36d (25 revisions)
(flutter/flutter#131785)
2023-08-02 [email protected] Added standard
deviation to rasterizer results. (flutter/flutter#131781)
2023-08-02 [email protected] Tiny remove outdated
comments (flutter/flutter#130387)
2023-08-02 49699333+dependabot[bot]@users.noreply.github.com Bump ubuntu
from `f8f6584` to `c9820a4` in /dev/ci/docker_linux
(flutter/flutter#130292)
2023-08-02 [email protected] Fix for endless recursion for
getLayoutExplorerNode on a Tooltip (flutter/flutter#131486)
2023-08-02 49699333+dependabot[bot]@users.noreply.github.com Bump
google/mirror-branch-action from 1.0 to 2.0 (flutter/flutter#126600)
2023-08-02 49699333+dependabot[bot]@users.noreply.github.com Bump
dessant/lock-threads from 4.0.0 to 4.0.1 (flutter/flutter#128741)
2023-08-02 49699333+dependabot[bot]@users.noreply.github.com Bump
codecov/codecov-action from 3.1.3 to 3.1.4 (flutter/flutter#126885)
2023-08-02 [email protected] Update `ThemeData`'s factory method
documents (flutter/flutter#123984)
2023-08-02 [email protected] Fix Scrollable `TabBar` for Material 3
(flutter/flutter#131409)
2023-08-02 [email protected] ImageProvider.toString uses
double.toStringAsFixed (flutter/flutter#131348)
2023-08-02 [email protected] Roll Flutter Engine from
10a1f9cb74c9 to 9dae7b708bda (4 revisions) (flutter/flutter#131706)
2023-08-01 [email protected] Upgrade Flutter libraries.
(flutter/flutter#131700)
2023-08-01 [email protected] Roll Flutter Engine from
1aadc75dd5a7 to 10a1f9cb74c9 (1 revision) (flutter/flutter#131696)
2023-08-01 [email protected] Roll Flutter Engine from
e3f817ce9953 to 1aadc75dd5a7 (2 revisions) (flutter/flutter#131691)
2023-08-01 [email protected] Roll Packages from
60e9a54 to 3dc00c1 (5 revisions) (flutter/flutter#131692)
2023-08-01 [email protected] Avoid concurrent modification of
persistent frame callbacks (flutter/flutter#131677)
2023-08-01 [email protected] Roll Flutter Engine from
ae535c024146 to e3f817ce9953 (1 revision) (flutter/flutter#131687)
2023-08-01 [email protected] Roll Flutter Engine from
703d45539059 to ae535c024146 (4 revisions) (flutter/flutter#131679)
2023-08-01 [email protected] Roll Flutter Engine from
f1c80ce98499 to 703d45539059 (1 revision) (flutter/flutter#131668)
2023-08-01 [email protected] Roll Flutter Engine from
2583c07f6a69 to f1c80ce98499 (1 revision) (flutter/flutter#131663)
2023-08-01 [email protected] Roll Flutter Engine from
25b9d1088d09 to 2583c07f6a69 (1 revision) (flutter/flutter#131661)
2023-08-01 [email protected] Roll Flutter Engine from
7651b3cba6ba to 25b9d1088d09 (4 revisions) (flutter/flutter#131655)
2023-08-01 [email protected] Roll Flutter Engine from
1433e23c8a3d to 7651b3cba6ba (2 revisions) (flutter/flutter#131648)
2023-08-01 [email protected] Roll Flutter Engine from
791f505c8c6e to 1433e23c8a3d (1 revision) (flutter/flutter#131647)
2023-08-01 [email protected] Roll Flutter Engine from
bb2a903c934c to 791f505c8c6e (4 revisions) (flutter/flutter#131645)
2023-08-01 [email protected] 🐛 Treat empty ARB content as empty map
when decoding (flutter/flutter#131242)
2023-08-01 [email protected] Roll Flutter Engine from
fe2369565f59 to bb2a903c934c (3 revisions) (flutter/flutter#131639)
2023-07-31 [email protected] Roll Flutter Engine from
b83172a4e995 to fe2369565f59 (12 revisions) (flutter/flutter#131638)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
...
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 tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[gen-l10n] Should not parse empty arb files as JSON content

3 participants