- rewrite to semi modular code
- run the sections first, then get counts
- section counts in ToC, skip if empty
- many link improvements: linkify bugs and commits rather than separate lines
Steven R. Loomis [Tue, 26 Jul 2022 17:19:55 +0000 (12:19 -0500)]
ICU-21755 commit checker: add support for COMMIT_METADATA.md file
- new option, --commit-metadata= with path to metadata file
- new option, --fix-version=41 (used for SKIP sections)
- scaffolding for 'bad commits' list
- new module CommitMetadata with unit tests
- sample file format TEST_COMMIT_METADATA.md
- such commits are skipped
- refactored the commit skipping part (formerly used for cherry pick skips)
- add a report section for skipped commits
- add a cache for JIRA queries (for dev use): --cache-for-dev "/tmp/cldr-commit-cache" - optional
- add an 'excluded commits' section at the bottom
- make sure commit metadata is used to update ticket IDs and messages.
Rich Gillam [Thu, 4 Aug 2022 23:01:04 +0000 (16:01 -0700)]
ICU-21125 Improvements to resource fallback:
- Added code to use the parentLocales data in supplementalData.xml to determine the "parent locale ID" to use when
the requested resource bundle is not present (ICU-21126).
- Added code to change the parent-chain search path to handle the script better (ICU-21125; algorithm was described
in CLDR-15265):
- The base search patch is now ll_Ssss_RR -> ll_RR -> ll_Ssss -> ll -> root
- If the requested script is not the default script for the requested language and region, we automatically
avoid fallbacks that will implicitly change the script.
- Added new code to the CLDR-to-ICU data generation tool to generate source code, and used it to generate the lookup
tables for the new resource-fallback logic (we can't use the existing resource files for this, since that would
involve opening a resource bundle while trying to open another resource bundle). The data-generation stuff is
intended to be generic enough to allow for us to generate more static data tables in the future.
- Commented out a few collator tests, and changed one resource bundle test, because they're incompatible with the
new fallback logic (specifically, the default-script logic).
Kirill Müller [Mon, 15 Aug 2022 04:57:22 +0000 (06:57 +0200)]
ICU-22117 Replace uprv_strncpy() by uprv_memcpy()
This fixes a warning on gcc 9.4.0, which is triggered because the third argument to strncpy() depends on the length of the second argument (but should actually indicate the buffer size). Replacing by memcpy() seems harmless because a null terminator is appended further below, and the buffer is sized to be "large enough" elsewhere.
See https://github.com/duckdb/duckdb/issues/4391 for details.
Fixing the warning is important for us, because the checks in the duckdb repository treat all warnings as errors.
Cyndy Ishida [Thu, 23 Jun 2022 13:50:39 +0000 (06:50 -0700)]
ICU-22072 Update Darwin Specific Macros
* Update `U_PF_IPHONE` to be 0 when building for macOS/macCatalyst.
* add macro definition for `attribute((visibility("hidden")))` for cases
where internal structs exist within exposed classes.
Cyndy Ishida [Tue, 21 Jun 2022 19:56:49 +0000 (12:56 -0700)]
ICU-22068 Cleanup inconsistent annotations between declarations and definitions
This cleans up inconsistent annotations between declared APIs in headers
vs defined implementations in cpp's. This better ensures the API's
referenceable in headers represent what is exposed and defined in the
ultimate binary library's symbol table.
Fredrik Roubert [Tue, 6 Sep 2022 19:18:38 +0000 (21:18 +0200)]
ICU-21148 Consistently use standard lowercase true/false everywhere.
This is the normal standard way in C, C++ as well as Java and there's no
longer any reason for ICU to be different. The various internal macros
providing custom boolean constants can all be deleted and code as well
as documentation can be updated to use lowercase true/false everywhere.
Rich Gillam [Wed, 31 Aug 2022 00:43:30 +0000 (17:43 -0700)]
ICU-22081 More API-review fixes: Hoisted the PersonName object to the top level (in its own source file) and moved
NameField and FieldModifier there, plus a number of smaller changes.
Rich Gillam [Sat, 27 Aug 2022 01:21:21 +0000 (18:21 -0700)]
ICU-22081 Addressed review comments:
- Changed all public Javadoc to use the proper verbiage for identifying this code as
a tech preview.
- Changed all references to ULocale in the API to use Locale instead.
- Changed PersonNameFormatter and SimplePersonName so that they're constructed by way
of separate builder objects.
- Added an internal constructor for PersonNameFormatter just for the use of the unit tests,
and added some unit tests that take advantage of the new constructor to test the internals
more thoroughly.
- Renamed format() to formatToString(), to make room to add a format() method later that
returns a FormattedPersonName.
- Added logic to guess the locale of a name object when the name object doesn't supply
a locale.
- Moved the function that constructs a SimplePersonName from a single string containing
key-value pairs out of the API and into the unit tests.
- Various smaller changes in response to API- and code-review comments.
The makefile hardcodes paths to the build directory into icu-config. It doesn’t
need to do this and it unnecessarily breaks build reproducibility. This patch
makes a simple change to avoid this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Andy Heninger [Tue, 10 May 2022 00:29:04 +0000 (17:29 -0700)]
ICU-21946 RBBI Break Cache Optimizations
Adjust RuleBasedBreakIterator::BreakCache::populateNear() to retain the cache
the cache contents in additional cases where are still useful, resulting in
improved performance.
This change is related to PR #2039, which addressed the same problem. This one
retains the cache contents in more situations.
Mihai Nita [Thu, 28 Jul 2022 22:23:39 +0000 (15:23 -0700)]
ICU-22101 Error prone reports "StringSplitter" error in PluralRules.java
String.split(String) and Pattern.split(CharSequence) have surprising behaviour.
"a::b:".split(":") produces ["a", "b"], when one would expect ["a", "", "b", ""]
The recommended fix is to use the Guava Splitter, or setting an explicit limit:
String.split(String,int limit) and Pattern.split(CharSequence,int limit)
ICU-22075 Adds a random waiting period (0 - 179 secs) to each test that runs as
part of a high concurrency performance test setup. This will disperse commits
of performance test results into the data branch over a wider time frame and
drastically reduces the chance of data uploads failing after ten unsuccesful
commit attempts.
Test runs showed a huge drop in failed commits/retry, from a high of 113
without wait down to only 4 with the extra wait.
ICU-22075 Add comment explaining the rationale of the random
sleep period prior to test execution.
Cyndy Ishida [Mon, 6 Jun 2022 23:18:50 +0000 (16:18 -0700)]
ICU-22054 Remove declarations for unimplemented APIs
This patch also includes marking `=delete` on specific `normal` member functions, as opposed to compiler generated functions,
based on the description of such functions' surrounding comments.
gnrunge [Wed, 8 Jun 2022 21:26:47 +0000 (14:26 -0700)]
ICU-21997 Fixes currency code retrieval for locale: instead of selecting the
first currency in the list now select the first legal tender currency in the
list. Or the first currency if the list has no legal tender currencies (which
is the previous behaviour).
ICU-21997 Removed an overlooked earlier unit test attempt.
ICU-21997 Shields C++ unit test from compilation when configuration flag
UCONFIG_NO_FORMATTING is set.
gnrunge [Wed, 8 Jun 2022 22:25:37 +0000 (15:25 -0700)]
ICU-22036 Modify ICU4J performance test framework to work when executed by
GitHub Action. This includes introducing a new flag (-a) to indicate
invocation from command line/GHA shell, moving elements of the workflow
from Perl into the Java framework (calculation of iteration numbers), and
generating NDJSON output for GitHub Benchmark processing.
Backward compatibility with the Perl script invocation has been preserved.
ICU-22036 Adds a comment clarifying the reason why NDJSON output is generated.
agrieve [Mon, 2 May 2022 17:13:41 +0000 (13:13 -0400)]
ICU-21960 Add missing "const" to kAttributeKey
This variable was flagged by a chromium check that looks for variables named like constants that end up in the `.data` ELF section (rather than in `.rodata`).