Skip to content

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

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 8 commits into from
Jul 21, 2025

Conversation

cpetig
Copy link
Collaborator

@cpetig cpetig commented Jul 20, 2025

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
Copy link
Collaborator Author

cpetig commented Jul 20, 2025

  • 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
Copy link
Collaborator Author

cpetig commented Jul 20, 2025

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

@cpetig
Copy link
Collaborator Author

cpetig commented Jul 20, 2025

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