-
Notifications
You must be signed in to change notification settings - Fork 1
feat: test against wit-bingen tests #16
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
Conversation
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.
Pull Request Overview
This PR implements comprehensive testing and validation for the wit-codegen tool by integrating test files from the wit-bindgen test suite. The PR adds substantial infrastructure for testing code generation against 199 real-world WIT files, providing crucial quality assurance for the code generator.
- WIT-bindgen test integration: Comprehensive testing against 199 WIT files from the official wit-bindgen test suite
- Modular architecture: Refactored wit-codegen.cpp into smaller, maintainable modules with improved type handling
- Complete validation framework: Python scripts and CMake targets for generating and validating C++ stubs from WIT files
Reviewed Changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| validation_results.txt | Test results showing 54.3% success rate across 199 WIT files with detailed failure analysis |
| tools/wit-codegen/wit-codegen.cpp | Major refactoring with modular headers, enhanced type mapping, and improved WIT parsing |
| tools/wit-codegen/utils.hpp | Utility functions for identifier sanitization and WIT parsing helpers |
| tools/wit-codegen/types.hpp | Data structures for WIT AST representation and code generation |
| tools/wit-codegen/type_mapper.hpp | Interface for WIT to C++ type mapping system |
| tools/wit-codegen/type_mapper.cpp | Implementation of comprehensive type mapping with cross-namespace support |
| tools/wit-codegen/CMakeLists.txt | Updated build configuration for modular architecture |
| test/validate_stubs.py | Python script for incremental validation of generated code |
| test/validate_all_wit_bindgen.py | Comprehensive validation against all wit-bindgen test files |
| test/generate_test_stubs.sh | Bash script for batch stub generation |
| test/generate_test_stubs.py | Enhanced Python script for stub generation with filtering |
| test/TESTING_GRAMMAR.md | Updated documentation for grammar testing workflow |
| test/StubGenerationTests.cmake | CMake integration for automated stub generation and validation |
| multiple documentation files | Comprehensive guides for stub generation, validation, and incremental testing |
| include/cmcpp/*.hpp | Enhanced type system with monostate support, record handling, and boolean operations |
f1baee1 to
c9f11d4
Compare
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.
Pull Request Overview
Copilot reviewed 39 out of 41 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
include/cmcpp/record.hpp:1
- Header guard comment should match the opening guard. It references 'CMCPP_MONOSTATE_HPP' but the opening guard is 'CMCPP_RECORD_HPP'.
#ifndef CMCPP_RECORD_HPP
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16 +/- ##
==========================================
- Coverage 84.11% 78.13% -5.98%
==========================================
Files 19 21 +2
Lines 1448 1537 +89
Branches 129 131 +2
==========================================
- Hits 1218 1201 -17
- Misses 140 236 +96
- Partials 90 100 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b7a2998 to
faade17
Compare
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.
Pull Request Overview
Copilot reviewed 40 out of 42 changed files in this pull request and generated 1 comment.
db35a1a to
9a1f01d
Compare
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
9a1f01d to
968dbae
Compare
Ubuntu Test Resultswit-stub-generation-test ResultsThis test is expected to have failures due to known issues with tuple wrapper types. Compilation Summary
Error Breakdown
Sample ErrorsKnown IssuesThe main issue is that Goal: These failures should ideally decrease over time or remain stable. Any increase warrants investigation. Updated: 2025-10-13T10:05:46.183Z |
No description provided.