Skip to content

Fix C# rejection tests with the stricter WIT parser - #2049

Merged
jsturtevant merged 1 commit into
hyperlight-dev:mainfrom
jsturtevant:fix/csharp-wit-rejection-tests
Nov 11, 2026
Merged

jsturtevant merged 1 commit into
hyperlight-dev:mainfrom
jsturtevant:fix/csharp-wit-rejection-tests

Conversation

@jsturtevant

@jsturtevant jsturtevant commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

#1964 upgraded  wit-parser  from 0.259.0 to 0.262.0. That causes wit to error earlier with these invalid WIT types which caused the test to fail before it go to the expected checks. This updates it to use a module to bypass the parser and get to the expected error

Input Parser error Upstream change
record e {} empty record bytecodealliance/wasm-tools#2680
flags e {} empty flags bytecodealliance/wasm-tools#2680
tuple<> empty tuple bytecodealliance/wasm-tools#2694
Flags with 33 or more members cannot have more than 32 flags bytecodealliance/wasm-tools#2719

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
@jsturtevant jsturtevant added the C-bug For PRs that fix bugs label Nov 11, 2026
@jsturtevant
jsturtevant requested a review from danbugs as a code owner November 11, 2026 19:03
@jsturtevant jsturtevant added A-testing Related to tests or testing infrastructure S-needs-review PR is ready for (re-)review labels Nov 11, 2026
Copilot AI balanced review requested due to automatic review settings November 11, 2026 19:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the component-text fixture and rejection-test updates.

No open issues 🎉

What changed in this PR

The C# rejection tests use component-text fixtures so unsupported types reach the generator’s validation checks despite stricter WIT parsing.

Changes:

  • Add a shared helper for generating component-text type fixtures.
  • Use the helper to test rejection of empty types and flags with more than 32 members.
File Description
src/​hyperlight_component_csharp/​src/​tests.rs Adds the fixture helper and updates the generator rejection tests.

Review effort: Balanced

@ludfjig ludfjig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks

@jsturtevant
jsturtevant enabled auto-merge (squash) November 11, 2026 19:19
@github-actions github-actions Bot removed the S-needs-review PR is ready for (re-)review label Nov 11, 2026
@jsturtevant
jsturtevant merged commit 90ca0f2 into hyperlight-dev:main Nov 11, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testing Related to tests or testing infrastructure C-bug For PRs that fix bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants