Skip to content

chore: derive the codegen Unicode version string from a single source of truth #19

Description

@OmarAlJarrah

Bumping the bundled Unicode version currently means editing two kinds of place:

  • unicodeVersionDir in tools/internal/ucd/ucd.go — the directory the generators read.
  • The hard-coded human-readable version strings emitted into the generated headers: unicodeVersion in tools/internal/codegen/idna_mapping.go, and the Unicode 17.0 / 17.0.0 literals in idna_validity.go and nfc_tables.go.

docs/idna-unicode-update.md documents a grep step to catch the literals, but they can drift out of sync with the directory pin. Expose the version from a single source of truth — for example, parse it from a UCD file header, or derive it from unicodeVersionDir — and have every generator consume it, so a version bump is a one-line change.

Follow-up to #17.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions