Skip to content

fix Intl.Segments#containing return value type #61236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 2, 2025

Conversation

petamoriken
Copy link
Contributor

Fixes #61235

@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 22, 2025

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/61236/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,390 62,390 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 194,160k (± 0.98%) 193,500k (± 0.75%) ~ 192,881k 196,476k p=0.128 n=6
Parse Time 1.31s (± 0.48%) 1.31s (± 0.31%) ~ 1.31s 1.32s p=0.673 n=6
Bind Time 0.73s 0.73s ~ ~ ~ p=1.000 n=6
Check Time 9.72s (± 0.50%) 9.73s (± 0.28%) ~ 9.69s 9.76s p=0.936 n=6
Emit Time 2.73s (± 0.36%) 2.73s (± 0.79%) ~ 2.70s 2.76s p=0.803 n=6
Total Time 14.49s (± 0.33%) 14.50s (± 0.18%) ~ 14.47s 14.53s p=0.871 n=6
angular-1 - node (v18.15.0, x64)
Errors 37 37 ~ ~ ~ p=1.000 n=6
Symbols 948,488 948,488 ~ ~ ~ p=1.000 n=6
Types 411,006 411,006 ~ ~ ~ p=1.000 n=6
Memory used 1,224,182k (± 0.00%) 1,224,200k (± 0.01%) ~ 1,224,127k 1,224,309k p=0.810 n=6
Parse Time 6.67s (± 0.76%) 6.64s (± 0.69%) ~ 6.55s 6.68s p=0.332 n=6
Bind Time 1.88s (± 0.64%) 1.90s (± 0.73%) ~ 1.88s 1.91s p=0.191 n=6
Check Time 31.78s (± 0.28%) 31.78s (± 0.29%) ~ 31.66s 31.93s p=0.809 n=6
Emit Time 15.26s (± 0.63%) 15.25s (± 0.61%) ~ 15.12s 15.41s p=1.000 n=6
Total Time 55.58s (± 0.26%) 55.56s (± 0.26%) ~ 55.38s 55.76s p=1.000 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,347,440 2,347,440 ~ ~ ~ p=1.000 n=6
Types 845,526 845,526 ~ ~ ~ p=1.000 n=6
Memory used 2,120,374k (± 0.00%) 2,120,392k (± 0.00%) ~ 2,120,351k 2,120,452k p=0.298 n=6
Parse Time 7.27s (± 0.22%) 7.25s (± 0.12%) ~ 7.24s 7.26s p=0.070 n=6
Bind Time 2.45s (± 0.84%) 2.44s (± 0.67%) ~ 2.42s 2.46s p=0.808 n=6
Check Time 72.70s (± 0.26%) 72.62s (± 0.37%) ~ 72.25s 73.00s p=0.521 n=6
Emit Time 0.15s (± 3.52%) 0.15s (± 3.52%) ~ 0.14s 0.15s p=1.000 n=6
Total Time 82.55s (± 0.23%) 82.46s (± 0.32%) ~ 82.12s 82.85s p=0.575 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,588 1,226,588 ~ ~ ~ p=1.000 n=6
Types 266,986 266,986 ~ ~ ~ p=1.000 n=6
Memory used 2,602,406k (±14.48%) 2,846,378k (±13.17%) ~ 2,359,521k 3,090,072k p=0.298 n=6
Parse Time 6.64s (± 1.80%) 6.70s (± 1.51%) ~ 6.55s 6.78s p=0.521 n=6
Bind Time 2.14s (± 1.74%) 2.18s (± 1.46%) ~ 2.14s 2.21s p=0.294 n=6
Check Time 42.72s (± 0.60%) 42.98s (± 0.55%) ~ 42.73s 43.41s p=0.298 n=6
Emit Time 3.54s (± 4.63%) 3.50s (± 3.21%) ~ 3.41s 3.71s p=0.689 n=6
Total Time 55.05s (± 0.53%) 55.36s (± 0.60%) ~ 54.91s 55.91s p=0.128 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,588 1,226,588 ~ ~ ~ p=1.000 n=6
Types 266,986 266,986 ~ ~ ~ p=1.000 n=6
Memory used 2,424,434k (± 0.01%) 2,424,646k (± 0.04%) ~ 2,424,001k 2,426,424k p=0.936 n=6
Parse Time 5.44s (± 0.76%) 5.47s (± 0.99%) ~ 5.40s 5.53s p=0.520 n=6
Bind Time 1.78s (± 1.39%) 1.78s (± 1.11%) ~ 1.76s 1.81s p=1.000 n=6
Check Time 35.37s (± 0.19%) 35.35s (± 0.36%) ~ 35.22s 35.50s p=0.936 n=6
Emit Time 3.07s (± 0.78%) 3.08s (± 4.67%) ~ 2.96s 3.36s p=0.336 n=6
Total Time 45.67s (± 0.18%) 45.67s (± 0.50%) ~ 45.42s 46.06s p=0.810 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,667 262,667 ~ ~ ~ p=1.000 n=6
Types 106,849 106,849 ~ ~ ~ p=1.000 n=6
Memory used 440,478k (± 0.01%) 440,477k (± 0.01%) ~ 440,389k 440,517k p=0.936 n=6
Parse Time 3.52s (± 0.90%) 3.53s (± 0.75%) ~ 3.49s 3.57s p=0.413 n=6
Bind Time 1.32s (± 1.05%) 1.31s (± 0.89%) ~ 1.30s 1.33s p=0.737 n=6
Check Time 18.91s (± 0.28%) 18.90s (± 0.38%) ~ 18.79s 18.97s p=1.000 n=6
Emit Time 1.52s (± 0.83%) 1.52s (± 1.18%) ~ 1.49s 1.54s p=0.934 n=6
Total Time 25.27s (± 0.20%) 25.27s (± 0.30%) ~ 25.15s 25.34s p=0.748 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 70 70 ~ ~ ~ p=1.000 n=6
Symbols 226,113 226,113 ~ ~ ~ p=1.000 n=6
Types 94,488 94,488 ~ ~ ~ p=1.000 n=6
Memory used 371,427k (± 0.05%) 371,450k (± 0.06%) ~ 371,308k 371,856k p=0.689 n=6
Parse Time 2.88s (± 0.72%) 2.90s (± 1.22%) ~ 2.85s 2.95s p=0.376 n=6
Bind Time 1.59s (± 1.67%) 1.61s (± 0.83%) ~ 1.60s 1.63s p=0.199 n=6
Check Time 16.45s (± 0.27%) 16.45s (± 0.31%) ~ 16.39s 16.52s p=0.872 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.92s (± 0.24%) 20.96s (± 0.20%) ~ 20.91s 21.03s p=0.468 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,230,017 3,230,017 ~ ~ ~ p=1.000 n=6
Types 1,095,648 1,095,648 ~ ~ ~ p=1.000 n=6
Memory used 3,306,674k (± 0.01%) 3,306,605k (± 0.01%) ~ 3,305,824k 3,306,959k p=1.000 n=6
Parse Time 14.38s (± 0.55%) 14.38s (± 0.45%) ~ 14.31s 14.46s p=0.872 n=6
Bind Time 4.60s (± 0.43%) 4.62s (± 0.92%) ~ 4.57s 4.67s p=0.809 n=6
Check Time 89.77s (± 1.85%) 89.46s (± 2.88%) ~ 87.32s 94.29s p=0.575 n=6
Emit Time 27.63s (± 0.75%) 27.75s (± 1.76%) ~ 27.47s 28.74s p=0.873 n=6
Total Time 136.38s (± 1.21%) 136.21s (± 1.88%) ~ 133.81s 140.88s p=0.630 n=6
webpack - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 293,866 293,866 ~ ~ ~ p=1.000 n=6
Types 119,628 119,628 ~ ~ ~ p=1.000 n=6
Memory used 447,068k (± 0.02%) 447,182k (± 0.01%) ~ 447,103k 447,245k p=0.054 n=6
Parse Time 4.07s (± 1.19%) 4.08s (± 1.19%) ~ 4.01s 4.15s p=1.000 n=6
Bind Time 1.76s (± 1.52%) 1.75s (± 1.43%) ~ 1.72s 1.79s p=0.934 n=6
Check Time 18.77s (± 0.37%) 18.84s (± 0.22%) ~ 18.78s 18.89s p=0.078 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.61s (± 0.13%) 24.67s (± 0.30%) +0.06s (+ 0.26%) 24.58s 24.80s p=0.043 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 559,094 559,094 ~ ~ ~ p=1.000 n=6
Types 187,011 187,011 ~ ~ ~ p=1.000 n=6
Memory used 496,237k (± 0.01%) 496,240k (± 0.02%) ~ 496,177k 496,385k p=0.575 n=6
Parse Time 3.42s (± 0.68%) 3.42s (± 0.69%) ~ 3.39s 3.46s p=1.000 n=6
Bind Time 1.20s (± 0.53%) 1.19s (± 1.14%) ~ 1.18s 1.21s p=0.362 n=6
Check Time 19.57s (± 0.26%) 19.64s (± 0.45%) ~ 19.55s 19.76s p=0.253 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.19s (± 0.19%) 24.25s (± 0.31%) ~ 24.16s 24.35s p=0.149 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos with tsc comparing main and refs/pull/61236/merge:

Everything looks good!

@petamoriken
Copy link
Contributor Author

@jakebailey Hi. I think this PR can be merged, how about it?

* @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`.
*/
containing(codeUnitIndex?: number): SegmentData;
containing(codeUnitIndex?: number): SegmentData | undefined;
Copy link
Member

@DanielRosenwasser DanielRosenwasser May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unfortunate because this would ideally be tied to noUncheckedIndexedAccess or something.

@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Jul 2, 2025
@DanielRosenwasser DanielRosenwasser merged commit 8518a87 into microsoft:main Jul 2, 2025
32 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Jul 2, 2025
@DanielRosenwasser
Copy link
Member

Thank you!

@petamoriken petamoriken deleted the fix/intl-segmenter branch July 3, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Intl.Segments.prototype.containing should include undefined in return value
4 participants