Skip to content

Test the C++ generator in CI (2nd version: with more fixes included and more upstream changes) - #1340

Merged
alexcrichton merged 8 commits into
bytecodealliance:mainfrom
cpetig:test-cpp
Jul 21, 2025
Merged

Test the C++ generator in CI (2nd version: with more fixes included and more upstream changes)#1340
alexcrichton merged 8 commits into
bytecodealliance:mainfrom
cpetig:test-cpp

Conversation

@cpetig

@cpetig cpetig commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator

Extends #1331 by Alex

@TartanLlama would love to hear from you about these changes as well as you wrote the original test case.

There are still 26 codegen tests failing:

  • import_export_func.wit: confuses function foo and namespace foo 😢
  • multiversion: we don't support versioned namespaces, yet
  • variants-unioning-types.wit: I guess this is import/export type incompatibility as these types are part of a world and not an interface
  • resource-borrow-in-record.wit: we don't include <span> here
  • 20 times TBD

@cpetig
cpetig requested a review from alexcrichton July 20, 2025 11:07
@cpetig cpetig self-assigned this Jul 20, 2025
@cpetig

cpetig commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator Author
  • lists.wit: We receive a const argument and create non-const references in lowering.
  • async-trait-function.wit: todo!() in crates/cpp/src/lib.rs:1795
  • resource-alias.wit: Likely still incomplete resource support
  • futures.wit, streams.wit: todo!() in crates/cpp/src/lib.rs:1579
  • ret-areas.wit: Multiple ret-areas? The first should be an argument buffer (rename).
  • keywords.wit: Escape some more names
  • simple-http.wit: Oh, we need optional to construct an expected even outside of autosar types (wrapping expected in optional gives you an unconditional default constructor)
  • variants.wit: string_view/span vs string/vector confusion and expected

I guess with this amount of significant effort I will introduce an "expected codegen failure" feature and mask them for now.

@cpetig

cpetig commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator Author

I just had to deploy the already existing infrastructure for expected codegen test failures, still fixing these some day would be nice 😉

@cpetig

cpetig commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator Author

This should be ready to merge, as it successfully turns on CI testing of C++, but the remaining expected test failures require more work.

@alexcrichton
alexcrichton added this pull request to the merge queue Jul 21, 2025
Merged via the queue into bytecodealliance:main with commit 454d688 Jul 21, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants