unicodetools icon indicating copy to clipboard operation
unicodetools copied to clipboard

Retire ToolUnicodeProperties & UCD.java

Open macchiati opened this issue 1 year ago • 2 comments

There are currently two ways of parsing the property files, ToolUnicodeProperties.java/UCD.java (very old), and the more modern IndexUnicodeProperties.java. I've long had on my task list replacing the old with new; the new is more extensible, and much easier to update for new properties and property values.

Here is a draft of the steps to do that:

  1. Analyze the differences between ToolUnicodeProperties.java and IndexUnicodeProperties.java to see if the latter can simply replace the former.
  2. If the differences would affect the results (tests, file generation), then write a shim for IndexUnicodeProperties.java where necessary.
  3. Find all the cases where internal code is calling UCD.java directly instead of using ToolUnicodeProperties.java.
  4. Replace those by calls to ShimIndexUnicodeProperties.java, and make sure everything still works.
  5. Replace calls to ToolUnicodeProperties by ShimIndexUnicodeProperties.java
  6. Remove UCD.java, UTC_Types.java, UCD_Names.java, ToolUnicodeProperties.java, and code only used by them.

macchiati avatar Jan 08 '24 04:01 macchiati

See also https://github.com/unicode-org/unicodetools/issues/484.

eggrobin avatar Jan 09 '24 18:01 eggrobin

thanks for the cross link

macchiati avatar Jan 09 '24 18:01 macchiati