-
Notifications
You must be signed in to change notification settings - Fork 5
fix: show both engines side-by-side in README benchmark table #826
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
+71
−33
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0a43d2b
fix: show only preferred engine in README benchmark table
carlos-alm ca6a828
fix: guard wasm null access and add prefLabel to query rows
carlos-alm 97b2cf4
fix: show both engines in all README benchmark rows
carlos-alm 8a83fe5
fix: guard against null wasm data in README benchmark table
carlos-alm f2a4335
Merge main into fix/benchmark-readme-table
carlos-alm 7914b33
Merge branch 'main' into fix/benchmark-readme-table
carlos-alm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latest.wasmwhen native is present but WASM is absenthasNativeis onlylatest.native != null, but every code path inside theif (hasNative)block directly dereferenceslatest.wasm(lines 332, 333, 342, 346, 362, 378–379) without guarding againstlatest.wasmbeingnull. If a benchmark run produces native data but WASM data is absent (e.g. the WASM grammar failed to build), this throwsTypeError: Cannot read properties of null. The immediately preceding commit (ca6a828) was literally titled "fix: guard wasm null access", so this scenario is known to happen in practice.Use a
hasBothflag instead:And replace every downstream
if (hasNative)guard (incremental rebuild rows, query latency rows, 50k-file estimate, resolution rows, andtableHeader) withif (hasBoth)so that WASM data is only shown when it is actually present.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8a83fe5. Introduced a
hasBothflag (hasNative && latest.wasm != null) and replaced everyif (hasNative)guard in the README-patch block withif (hasBoth). The two-column layout now only activates when both engines have data. When only native is present (no WASM), falls back to single-column layout using apref = latest.native || latest.wasmpattern — same approach used for the existing WASM-only fallback. ThehasNativevariable is retained only for the intermediate native-only branch in the build speed / query time rows.