-
Notifications
You must be signed in to change notification settings - Fork 29.7k
🐛 Treat empty ARB content as empty map when decoding #131242
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
Conversation
| final List<File> files = directory | ||
| .listSync() | ||
| .whereType<File>() | ||
| .where((File e) => filenameRE.hasMatch(e.path)) | ||
| .toList() | ||
| ..sort(sortFilesByPath); |
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.
There are some spacing issues here and we should also add a comment to clarify why we need sort.
| 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); |
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.
The spacing should be correct, you may run dart format to check the result.
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.
Comments are added.
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.
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.
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.
The spacing should be correct, you may run
dart formatto 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.
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.
For the record, these are what I've found in the repo:
flutter/packages/flutter_tools/lib/src/web/compile.dart
Lines 237 to 240 in f8afcd5
| final List<String> sortedList = values.entries | |
| .map((MapEntry<String, Object> e) => '${e.key}: ${e.value};') | |
| .toList() | |
| ..sort(); |
flutter/packages/flutter_tools/lib/src/base/analyze_size.dart
Lines 326 to 327 in f8afcd5
| 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.
packages/flutter_tools/test/commands.shard/hermetic/generate_localizations_test.dart
Show resolved
Hide resolved
thkim1011
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.
|
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. |
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 ...
Fixes #128932.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.