-
Notifications
You must be signed in to change notification settings - Fork 6k
Wires the locale provided by Fuchsia. #13045
Conversation
b05f16d to
0d30560
Compare
chinmaygarde
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.
Other than the license block and that we should just update our ICU version instead of backporting patches, lgtm.
| @@ -0,0 +1,126 @@ | |||
| // Copyright 2019 The Flutter Authors. All rights reserved. | |||
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.
Please use the usual Flutter license block like in the files next to this TU.
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.
Will do. I will just assume that your suggested approach is fine.
|
|
||
| using icu::Locale; | ||
|
|
||
| // This backfills for the static method icu::Locale::forLanguageTag which is |
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.
We should just update the ICU version ourselves. I did it about a year ago so it is definitely a bit old.
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.
OK. But, let me do so in a separate change then.
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.
Do you have a preference for the version? ICU 64 has been released on Oct 3. 64.2 was current before, but it also has a lot of patches that would need to be applied too.
e885e16 to
b1be359
Compare
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. Previous update was here: flutter#6097 I was advised to upgrade in the code revie for this PR: flutter#13045 This change brings in the icu::Locale::forLanguageTag(...) function which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers)
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. Previous update was here: flutter#6097 I was advised to upgrade in the code revie for this PR: flutter#13045 This change brings in the icu::Locale::forLanguageTag(...) function which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers)
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code revie for this PR: flutter#13045 This change brings in the icu::Locale::forLanguageTag(...) function which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers) Tested: ```bash #!/bin/bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers) Tested: ```bash #!/bin/bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers) Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers) Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers) Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers) Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. * TODO(filmil): Release notes (will work with reviewers) Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: flutter#6097 I was advised to upgrade in the code review for this PR: flutter#13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
The current version is 62.1, which is a now 3 major releases behind, given that ICU 65 was released on Oct 3, 2019. The version bump required an update to buildroot to fix too strict compilation of ICU. Previous update was here: #6097 I was advised to upgrade in the code review for this PR: #13045 This change brings in the function `icu::Locale::forLanguageTag(...)` which is directly relevant to the work in the PR, but also updates the library considerably. Tested: ```bash set -x readonly FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --unoptimized ninja -j 100 -C "${OUT_DIR}/host_debug_unopt" ./flutter/testing/run_tests.py --type engine ) ```
|
@filmil looks like the ICU upgrade landed but was reverted. I assume you're working on a re-land before picking this up again? |
|
@cbracken My understanding is that build cops needed to re-sequence several ICU landings, and will reapply the ICU upgrade that I did. Once done, they will reapply my change, and I can continue on this. Will let you know when ready. |
b9d6479 to
c9ee1c3
Compare
|
I had a license file merge to do, and this took a while. The current commit seems to validate well on my machine, let's see if the pre-commit hooks agree. |
567fed3 to
19edf29
Compare
|
@chinmaygarde @cbracken PTAL? This has now passed all checks, whew! |
chinmaygarde
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. May I land it?
|
Yes, please.
…On Wed, Oct 23, 2019 at 12:20 PM Chinmay Garde ***@***.***> wrote:
***@***.**** approved this pull request.
LGTM. May I land it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13045?email_source=notifications&email_token=AAB4GMH64AAY3D37ICXKET3QQCPXPA5CNFSM4I7FTKG2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCI7S7PA#pullrequestreview-306130876>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB4GMENQXQBW7T7AOTOS33QQCPXPANCNFSM4I7FTKGQ>
.
|
The FIDL service `fuchsia.intl.PropertyProvider` is a service that the flutter runner can use to obtain information on system preferred locales. This change sends a platform message "setLocale" on the channel "flutter/localization", based on the values provided by the above mentioned FIDL service. Credit: most of this was initially written by @kpozin; I ported it to out-of-tree flutter engine. Tested: 1. Compile and publish the unit tests package as shown in the script below. 2. In a Fuchsia repository (pointed to by `$FUCHSIA_DIR`), run `fx serve` 3. `fx shell run fuchsia-pkg://fuchsia.com/flutter_runner_tests#meta/flutter_runner_tests.cmx` The script used to update the unit tests. ```bash set -x FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --fuchsia --fuchsia-cpu x64 --unoptimized ninja -j 100 -C "${OUT_DIR}/fuchsia_debug_unopt_x64" cp "${OUT_DIR}/compile_commands.json" "${FLUTTER_ENGINE_DIR}" echo "Publishing the tests package" "${FLUTTER_ENGINE_DIR}/fuchsia/sdk/linux/tools/pm" publish \ -a -r $FUCHSIA_DIR/out/release/amber-files \ -f "${FLUTTER_ENGINE_DIR}/out/fuchsia_debug_unopt_x64/flutter_runner_tests-0.far" ) ```
|
Rebased on top of current HEAD. |
git@github.com:flutter/engine.git/compare/195425e04480...400e3b0 git log 195425e..400e3b0 --no-merges --oneline 2019-10-23 fmil@google.com Wires the locale provided by Fuchsia. (flutter/engine#13045) 2019-10-23 chinmaygarde@google.com Add FlutterEngineRunsAOTCompiledDartCode to the embedder API. (flutter/engine#13319) 2019-10-23 50856934+nturgut@users.noreply.github.com [web] [test] Adding firefox install functionality to the test platform (flutter/engine#13272) 2019-10-23 skia-flutter-autoroll@skia.org Roll src/third_party/skia 32803ff74448..6863bb0930cf (7 commits) (flutter/engine#13318) 2019-10-23 bkonyi@google.com Roll src/third_party/dart 5fd6c8a3c1..b359ac0a1e (2 commits) 2019-10-23 iska.kaushik@gmail.com [recipe] Upload opt flutter_tester (flutter/engine#13311) 2019-10-23 jason-simmons@users.noreply.github.com Update the dependencies for the Fuchsia build of flutter_frontend_server (flutter/engine#13316) 2019-10-23 jmccandless@google.com NO_SUGGESTIONS keyboard flag in Android (flutter/engine#13099) 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 aaclarke@google.com on the revert to ensure that a human is aware of the problem. 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/+/master/autoroll/README.md
git@github.com:flutter/engine.git/compare/195425e04480...400e3b0 git log 195425e..400e3b0 --no-merges --oneline 2019-10-23 fmil@google.com Wires the locale provided by Fuchsia. (flutter/engine#13045) 2019-10-23 chinmaygarde@google.com Add FlutterEngineRunsAOTCompiledDartCode to the embedder API. (flutter/engine#13319) 2019-10-23 50856934+nturgut@users.noreply.github.com [web] [test] Adding firefox install functionality to the test platform (flutter/engine#13272) 2019-10-23 skia-flutter-autoroll@skia.org Roll src/third_party/skia 32803ff74448..6863bb0930cf (7 commits) (flutter/engine#13318) 2019-10-23 bkonyi@google.com Roll src/third_party/dart 5fd6c8a3c1..b359ac0a1e (2 commits) 2019-10-23 iska.kaushik@gmail.com [recipe] Upload opt flutter_tester (flutter/engine#13311) 2019-10-23 jason-simmons@users.noreply.github.com Update the dependencies for the Fuchsia build of flutter_frontend_server (flutter/engine#13316) 2019-10-23 jmccandless@google.com NO_SUGGESTIONS keyboard flag in Android (flutter/engine#13099) 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 aaclarke@google.com on the revert to ensure that a human is aware of the problem. 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/+/master/autoroll/README.md
The FIDL service
fuchsia.intl.PropertyProvideris a service thatthe flutter runner can use to obtain information on system preferred
locales.
This change sends a platform message "setLocale" on the channel
"flutter/localization", based on the values provided by the above
mentioned FIDL service.
Credit: most of this was initially written by @kpozin; I ported it
to out-of-tree flutter engine.
Tested:
the script below.
$FUCHSIA_DIR), runfx servefx shell run fuchsia-pkg://fuchsia.com/flutter_runner_tests#meta/flutter_runner_tests.cmxThe script used to update the unit tests.