boa icon indicating copy to clipboard operation
boa copied to clipboard

Title:Emoji 16.0 sequences fail because regress uses Unicode 15.1 tables

Open amrkhaled104 opened this issue 9 months ago • 4 comments

Describe the bug RegExp fails to match new Emoji 16.0 sequences (e.g., the Cook Islands flag 🇨🇶) when the v flag is used. Even with the latest engine updates, these sequences return None during execution

To Reproduce Running the official Test262 suite for Emoji 16.0 or the following code in Boa:

const re = /^\p{RGI_Emoji}$/v;
re.test("🇨🇶"); // Returns false, but should be true

Expected behavior The regex should correctly match all RGI Emoji sequences defined in the Unicode 16.0 standard. Currently, it only matches emojis up to version 15.1.

Additional context

I did a deep dive into the boa_engine and found the following:

Engine Logic: The engine correctly routes through Path: UTF16 (Unicode/V flag).

Root Cause: The issue is in the regress dependency. I checked the source code of regress v0.10.5 in gen-unicode/src/main.rs and found that the Unicode path is hardcoded to an old version: const UCD_PATH: &str = "/tmp/ucd-15.1.0"; https://github.com/ridiculousfish/regress/blob/master/gen-unicode/src/main.rs line 24

Debug Logs:

Image Image

This confirms that the internal tables in regress were not updated for Unicode 16.0, causing the match to fail.

amrkhaled104 avatar Mar 01 '26 20:03 amrkhaled104

Hi @jedel1043 @nekevss , I suggest we add the test\built-ins\RegExp\unicodeSets\generated\rgi-emoji-16.0.js test\built-ins\RegExp\unicodeSets\generated\rgi-emoji-17.0.js test files to the ignore list (or skip them in Test262 runner) for now. This will prevent the CI from failing until the library updates its Unicode tables. What do you think?"

amrkhaled104 avatar Mar 01 '26 20:03 amrkhaled104

Please report this in the regress repository. We can ignore the tests, but we should add a TODO comment on the ignore line to remind us to remove it when regress' issue gets fixed.

jedel1043 avatar Mar 01 '26 20:03 jedel1043

I’ve already opened an issue there. Should I open a PR here with the ignored tests, or is that unnecessary? Would it be better to fix it locally and then include it with the next bug fix PR?

amrkhaled104 avatar Mar 01 '26 21:03 amrkhaled104

It could take a while until the issue gets fixed, so can you open a PR to ignore those tests? You can add a link to regress' issue above the ignore lines

jedel1043 avatar Mar 01 '26 23:03 jedel1043