guppylang
guppylang copied to clipboard
feat!: Validate signatures against wasm file
Resolves #1093
BREAKING CHANGE:
- The
@wasm_moduledecorator now raises a compile time error unless it points to a matching.wasmfile in the users filesystem @wasmfunctions raise errors unless they match the corresponding functions in the.wasmfile- Redo the
FirstArgNotModuleerror class, which is used for WASM errors
Bencher Report
| Branch | cr/wasm-validation |
| Testbed | Linux |
Click to view all benchmark results
Bencher Report
| Branch | cr/wasm-validation |
| Testbed | Linux |
Click to view all benchmark results
| Benchmark | hugr_bytes | Benchmark Result bytes x 1e3 (Result Δ%) | Upper Boundary bytes x 1e3 (Limit %) | hugr_nodes | Benchmark Result nodes (Result Δ%) | Upper Boundary nodes (Limit %) |
|---|---|---|---|---|---|---|
| tests/benchmarks/test_big_array.py::test_big_array_compile | 📈 view plot 🚷 view threshold | 143.67 x 1e3(0.00%)Baseline: 143.67 x 1e3 | 145.10 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 6,590.00(0.00%)Baseline: 6,590.00 | 6,655.90 (99.01%) |
| tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile | 📈 view plot 🚷 view threshold | 21.64 x 1e3(0.00%)Baseline: 21.64 x 1e3 | 21.86 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 606.00(0.00%)Baseline: 606.00 | 612.06 (99.01%) |
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 93.54%. Comparing base (bae0da1) to head (4f929ba).
:warning: Report is 6 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1339 +/- ##
==========================================
+ Coverage 93.45% 93.54% +0.08%
==========================================
Files 125 126 +1
Lines 11278 11395 +117
==========================================
+ Hits 10540 10659 +119
+ Misses 738 736 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This PR contains breaking changes to the public Python API.
Breaking changes summary
guppylang-internals/src/guppylang_internals/checker/errors/wasm.py:15: FirstArgNotModule.span_label:
Attribute value was changed:
Old: 'First argument to WASM function should be a reference to a WASM module. Found `{ty}` instead'
New: 'First argument to WASM function should be a WASM module.'
guppylang-internals/src/guppylang_internals/checker/errors/wasm.py:0: FirstArgNotModule.ty:
Public object was removed
guppylang-internals/src/guppylang_internals/checker/errors/wasm.py:0: FirstArgNotModule.__init__(ty):
Parameter was removed