8000 icu: generate all of ICU's data from text (no prebuilt .dat or property tables) by bryan-minimal · Pull Request #836 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

icu: generate all of ICU's data from text (no prebuilt .dat or property tables) - #836

Draft
bryan-minimal wants to merge 3 commits into
mainfrom
bryan/icu-data-from-text
Draft

bryan-minimal wants to merge 3 commits into
mainfrom
bryan/icu-data-from-text

Conversation

@bryan-minimal
Copy link
Copy Markdown
Member

What

packages/icu (78.3) built from icu4c-78.3-sources.tgz, which ships ICU's data prebuilt:

  • data/in/icudt78l.dat (33 MB): the whole locale, collation, break-iterator and converter database;
  • 21 core Unicode property files: data/in/*.icu, *.nrm, coll/*.icu, plus the *_props_data.h,
    propname_data.h and norm2_nfc_data.h headers compiled into libicuuc.

make only repackaged these into libicudata/libicuuc. They reach every ICU consumer at runtime,
including node/node-lts (--with-intl=system-icu). A content census of node's whole closure found them
to be the only prebuilt binaries that reach its installed output.

This PR builds ICU from the release-78.3 git tag, where all of this exists as text, and generates
every data file in the build:

  1. It deletes the checked-in generated files, as ICU's own icu4c/source/data/unidata/generate.sh does,
    and fails if a .dat is present.
  2. It builds ICU's generators (gennorm2, genprops, genuca) from ICU's BUILD.bazel files,
    without Bazel. minibazel.py evaluates those files, which use only plain
    cc_library/cc_binary, and compiles the targets with the toolchain gcc/g++.
  3. It runs them as generate.sh does: normalization data from unidata/norm2/*.txt, properties from
    ppucd.txt, and collation from FractionalUCA.txt.
  4. The normal ICU build then compiles the locale, collation and converter data from text with
    genrb/makeconv/genbrk/… (4,073 resource bundles, 190 converters).

Evidence (lab, cg-fresh amd64)

  • ICU's generate.sh with Bazel at the tag: all 22 regenerated files are byte-identical to the
    shipped ones.
  • The same steps without Bazel (minibazel.py): all 22 are byte-identical.
  • Data from text: with no .dat present, the built icudt78l.dat is byte-identical to the shipped
    one (all 4,305 items).
  • This recipe vs the current one: libicudata, libicuuc and libicui18n are byte-identical
    (253/253 installed files). The one exception is usr/lib/icu/78.3/pkgdata.inc, which records the
    build's CFLAGS, including the source path.

Notes

  • Text inputs still trusted, all upstream text in the tag:
    • ppucd.txt, ICU's preparsed form of Unicode's UCD, made by tools/unicode/py/preparseucd.py;
      regenerating it from the raw UCD is a possible follow-up;
    • FractionalUCA.txt from CLDR;
    • the normalization and locale sources.
  • New build dep: python (no cycle; python does not depend on icu).
  • Source: the tag tarball, mirrored to gs://minimal-staging-archives/icu-release-78.3.tar.gz
    (sha256 f06bcab7…, read back).
  • Importers cold-rebuild: actions-runner, libxml2, node, node-lts, postgres, re2. Their ICU bytes are
    unchanged.

🤖 Generated with Claude Code

bryan-minimal and others added 3 commits October 7, 2026 14:39
The sources tarball ships the data prebuilt (icudt78l.dat). Building from
icu4c-78.3-data.zip with the ICU tools built here gives a byte-identical
archive and libicudata (all 4305 items).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ICU's release tarballs also ship its core property tables prebuilt
(data/in/*.icu, *.nrm, coll/*.icu and the *_props_data.h headers compiled into
libicuuc). The release-78.3 tag carries their text inputs and generators;
minibazel.py builds gennorm2, genprops and genuca from ICU's BUILD.bazel files
with gcc, and the recipe runs them as ICU's data/unidata/generate.sh does.
Every installed library is byte-identical to the previous recipe's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai
coderabbitai Bot commented Oct 8, 2026
Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0