From 6381d11abde9fb5b31472bbdbea87d542cd15a13 Mon Sep 17 00:00:00 2001 From: Filip Filmar Date: Fri, 13 Nov 2020 14:52:11 -0800 Subject: [PATCH] Roll ICU to c2a4cae149aae7fd30c4cbe3cf1b30df03b386f1 (flutter/engine#22465) Changes to make this work: - Had to change the use of an UBool constant `FALSE` to 0 because the file referring to it does not include the respective header. - Had to change the license checker to ignore files in the directory icu/source/samples. There were random changes to the licensing headers which tripped up license checks. And since we don't include samples in the binaries we build, the most efficient way to fix it is to exclude sample code from license checks. Issue: https://github.com/flutter/flutter/issues/70370 --- DEPS | 2 +- engine/src/flutter/ci/licenses_golden/tool_signature | 2 +- .../third_party/txt/src/minikin/FontLanguageListCache.cpp | 3 ++- engine/src/flutter/tools/licenses/lib/main.dart | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index a18e146c0f..61841e311a 100644 --- a/DEPS +++ b/DEPS @@ -143,7 +143,7 @@ deps = { Var('chromium_git') + '/chromium/src/ios.git' + '@' + Var('ios_tools_revision'), 'src/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '715ec351c0bcdd6b2d22f36e7d33b8e2ec519846', + Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'c2a4cae149aae7fd30c4cbe3cf1b30df03b386f1', 'src/third_party/khronos': Var('chromium_git') + '/chromium/src/third_party/khronos.git' + '@' + '7122230e90547962e0f0c627f62eeed3c701f275', diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index 391242dd58..7852eee05b 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: cb6e21d8ae26cdf8275f83c4efaa3fcc +Signature: 1f9d73861a9bb353a12cfa2ba38f6a12 diff --git a/engine/src/flutter/third_party/txt/src/minikin/FontLanguageListCache.cpp b/engine/src/flutter/third_party/txt/src/minikin/FontLanguageListCache.cpp index e08e88d00a..eb4ac69ee1 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/FontLanguageListCache.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/FontLanguageListCache.cpp @@ -70,7 +70,8 @@ static size_t toLanguageTag(char* output, } uErr = U_ZERO_ERROR; - outLength = uloc_toLanguageTag(likelyChars, output, outSize, FALSE, &uErr); + outLength = + uloc_toLanguageTag(likelyChars, output, outSize, /*false*/ 0, &uErr); if (U_FAILURE(uErr)) { // unable to build a proper language identifier ALOGD("uloc_toLanguageTag(\"%s\") failed: %s", likelyChars, diff --git a/engine/src/flutter/tools/licenses/lib/main.dart b/engine/src/flutter/tools/licenses/lib/main.dart index 44dba00a9c..dea6bf14ae 100644 --- a/engine/src/flutter/tools/licenses/lib/main.dart +++ b/engine/src/flutter/tools/licenses/lib/main.dart @@ -55,8 +55,10 @@ abstract class _RepositoryLicensedFile extends _RepositoryFile { static final RegExp _readmeNamePattern = RegExp(r'\b_*(?:readme|contributing|patents)_*\b', caseSensitive: false); static final RegExp _buildTimePattern = RegExp(r'^(?!.*gen$)(?:CMakeLists\.txt|(?:pkgdata)?Makefile(?:\.inc)?(?:\.am|\.in|)|configure(?:\.ac|\.in)?|config\.(?:sub|guess)|.+\.m4|install-sh|.+\.sh|.+\.bat|.+\.pyc?|.+\.pl|icu-configure|.+\.gypi?|.*\.gni?|.+\.mk|.+\.cmake|.+\.gradle|.+\.yaml|pubspec\.lock|\.packages|vms_make\.com|pom\.xml|\.project|source\.properties|.+\.obj|.+\.autopkg)$', caseSensitive: false); static final RegExp _docsPattern = RegExp(r'^(?:INSTALL|NEWS|OWNERS|AUTHORS|ChangeLog(?:\.rst|\.[0-9]+)?|.+\.txt|.+\.md|.+\.log|.+\.css|.+\.1|doxygen\.config|Doxyfile|.+\.spec(?:\.in)?)$', caseSensitive: false); - static final RegExp _devPattern = RegExp(r'^(?:codereview\.settings|.+\.~|.+\.~[0-9]+~|\.clang-format|\.gitattributes|\.landmines|\.DS_Store|\.travis\.yml|\.cirrus\.yml)$', caseSensitive: false); + static final RegExp _devPattern = RegExp(r'^(?:codereview\.settings|.+\.~|.+\.~[0-9]+~|\.clang-format|\.gitattributes|\.landmines|\.DS_Store|\.travis\.yml|\.cirrus\.yml|\.cache)$', caseSensitive: false); static final RegExp _testsPattern = RegExp(r'^(?:tj(?:bench|example)test\.(?:java\.)?in|example\.c)$', caseSensitive: false); + // The ICU library has sample code that will never get linked. + static final RegExp _icuSamplesPattern = RegExp(r'.*(?:icu\/source\/samples).*$', caseSensitive: false); bool get isIncludedInBuildProducts { return !io.name.contains(_readmeNamePattern) @@ -64,6 +66,7 @@ abstract class _RepositoryLicensedFile extends _RepositoryFile { && !io.name.contains(_docsPattern) && !io.name.contains(_devPattern) && !io.name.contains(_testsPattern) + && !io.toString().contains(_icuSamplesPattern) && !isShellScript; }