feat(dns): the rest of UTS #46 - mapping, NFC, CONTEXTJ/CONTEXTO and Bidi #832
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!832
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/365-uts46-rest"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #365
The rest of UTS #46 for
DomainName.tryFrom(DNS.md slice 9), in two commits. Please land with rebase (two Conventional Commits, no merge commit).feat(dns): UTS #46 mapping, NFC, validity and the combining-mark rule- the IDNA mapping table of Unicode 17.0.0 through the natives ofruntime/idna.c, NFC withString.toNfc, the validity criteria of UTS #46 section 4.1 (V1, V3, V4, V5, V6 with STD3), the hand-written ranges deleted with no fallback. A refused code point is named asU+XXXX;DnsError.InvalidName(text, reason)is unchanged and there is no new case. ZWNJ and ZWJ stay refused until commit 2.feat(dns): CONTEXTJ, CONTEXTO and the Bidi rule- the context rules of RFC 5892 (appendix A.1 to A.9) and the Bidi rule of RFC 5893; the temporary joiner refusal and the harness skip of the B and C lines are gone, so every line ofIdnaTestV2.txtagrees. The excerpt adds 21 hand-written CONTEXTO lines (UTS #46 does not check CONTEXTO).Tests:
std/dns/tests/idna.test.trb: 420 lines ofIdnaTestV2.txt(every status code of the toAsciiN column), and the whole file whereTORB_IDNA_TESTnames it; tier B runs that aftertools/fetch-unicode.sh(tools/gates.sh, gate "IdnaTestV2.txt, every line (std/dns)").names.test.trb: Cyrillic and Greek upper case,bu+ U+0308, a leading combining mark, ß and ς, a disallowed code point named in the reason, the A-label that maps differently, the length limits; Persian ZWNJ accepted and a stray ZWNJ refused, ZWJ after a virama only,l·laccepted anda·brefused, the keraia, the Hebrew geresh, the Katakana middle dot, mixed Arabic-Indic digits, and Arabic/Latin Bidi refusals.Docs: DNS.md section 3 rewritten (the "What is not covered" table is gone), slice 9,
docs/standard-library/dns.md, URI.md andstd/uri/src/authority.trb, skills regenerated.tools/size-cost.shalso measures a program that links every table; its numbers (Unicode 17.0.0; hello-world 406136 bytes with the tables adding 0 bytes, a program using every table 710400 bytes) are the paragraph "The size of the Unicode tables" indocs/PERFORMANCE.md, taken from the tier B run of the previous head.2044a2517b55a12a4aef55a12a4aef9ce3c31fadReview of
9ce3c31(CI green on this head: tier A, tier B incl. the full IdnaTestV2 gate, bootstrap, JS/PHP conformance, pdisc).Checklist
idna.test.trbruns a 420-line excerpt (>= 400 as #365 asks) and the whole file in tier B;names.test.trbcovers each rule the issue lists.joinerAllowedagainst RFC 5892 A.1/A.2,contextAllowedagainst A.3-A.9, andlabelBidiRefusalagainst RFC 5893 conditions 1-6, and found no deviation. The hand-written ranges are gone with no fallback.DnsErrorcase;ofPresentationandofLabelsare untouched.network-lookup.allocationsmoves with the code.INDEX.mdin the diff is fine here:.pdisc.yamlhas noindex.sync: main, and the pdisc check is green.Findings
docs/PERFORMANCE.mdthat states the Unicode version and the measured size of all tables together in a native hello-world binary and in a program that uses every table". The diff does not touchdocs/PERFORMANCE.md. The body defers it ("its numbers go into PERFORMANCE.md once CI has them"), but the PR saysCloses #365, so merging would close the issue with that criterion open. Either add the paragraph to this PR with the numbers from thetools/size-cost.shstep of this head's tier B run, or dropCloses #365and track the paragraph in a follow-up issue linked in the body, so #365 does not close early. The first option is simpler, because the numbers now exist.Re-review will check only this point.
9ce3c31fad3cd34d37acFinding 1 of review 815 is addressed on head
3cd34d37(the amended second commit; the only change against9ce3c31isdocs/PERFORMANCE.md, +9 lines). The new paragraph "The size of the Unicode tables" states Unicode 17.0.0 and the numbers of thetools/size-cost.shstep of the tier B run of9ce3c31(native--release): hello-world 406136 bytes with the tables adding 0 bytes (bound 4096); a program that uses every table 710400 bytes (304264 over hello-world); objects unicode.o 3257 + unicode_data.o 30752, normalization.o 3405 + normalization_data.o 87010, idna.o 1477 + idna_data.o 60064 bytes. The PR body points to the paragraph,Closes #365stays. Code is unchanged, so only this point needs a re-check; CI of3cd34d37is running.Re-review of
3cd34d3(CI green on this head: tier A, tier B, bootstrap, JS/PHP conformance, pdisc).docs/PERFORMANCE.md+9 lines, "The size of the Unicode tables": Unicode 17.0.0, hello-world 406136 bytes with tables adding 0 bytes, a program using every table 710400 bytes, per-object sizes. This covers the acceptance line of #365.std/dns/src/name.trb, the tests,tools/size-cost.sh,tools/gates.sh, DNS.md,std/INDEX.mdand the allocations file are identical between9ce3c31and3cd34d3.Non-blocking: none. Merging with rebase as the body asks.