Skip to content

Comments

Split generated file into multiple files, separating static code from generated code#86

Merged
Manishearth merged 14 commits intomasterfrom
tests-split
Feb 19, 2026
Merged

Split generated file into multiple files, separating static code from generated code#86
Manishearth merged 14 commits intomasterfrom
tests-split

Conversation

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Feb 19, 2026

I've split the massive tables.rs into:

  • lookup.rs, gen/lookup.rs, containing "ties it together" code. Probably could be renamed
  • props.rs, gen/props.rs, containing unicode property things
  • gen/tables.rs which contains actual large tables
  • tests.rs, gen/tests.rs with the tests

Furthermore I've replaced some of the duplicated functions with a single function that has a const generic.

This means that most of the code in this crate is no longer within python docstrings, and it's all a bit more organized and readable.

n.b. I tried out gemini-cli for most of the gruntwork here, giving it a detailed idea of what code needed to go where and asking it to figure out the rest. Seemed to work fine, and I've reviewed the diffs.

Fixes #85

@Manishearth Manishearth force-pushed the tests-split branch 3 times, most recently from 7ac9666 to 88a4d0e Compare February 19, 2026 02:59
@Manishearth Manishearth changed the title Split tests file from tables file Split generated file into multiple files, separating static code from generated code. Feb 19, 2026
@Manishearth Manishearth changed the title Split generated file into multiple files, separating static code from generated code. Split generated file into multiple files, separating static code from generated code Feb 19, 2026
@Manishearth Manishearth merged commit d8654db into master Feb 19, 2026
3 checks passed
@Manishearth Manishearth deleted the tests-split branch February 19, 2026 16:40
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.

tables.rs should only contain tables

1 participant