sway icon indicating copy to clipboard operation
sway copied to clipboard

Failing forc unit test: ok_vec_buffer_ownership

Open sdankel opened this issue 1 year ago • 3 comments

With the test uncommented, forc test --path sway-lib-std results in this error:

Verification failed at ok_vec_buffer_ownership::entry
library {
    entry fn ok_vec_buffer_ownership() -> (), !4 {
        local [u8; 4] __anon_0
        local { u64, ( () | u8 ) } __anon_1
        local { u64, ( () | u8 ) } __anon_2
        local mut { { u64, u64 }, u64 } bytes
        local mut { { u64, u64 }, u64 } bytes_
error: Internal compiler error: Verification failed: Struct field type mismatch: (Element type "u64" versus index type Some("u8")).
Please file an issue on the repository and include the code that triggered this error.

It also fails for ok_bytes_buffer_ownership

When fixed, we should uncomment the tests. Thanks @alfiedotwtf for discovering these

sdankel avatar Sep 18 '24 17:09 sdankel

@bitzoic @IGI-111 for viz

These tests weren't failing in CI due to https://github.com/FuelLabs/sway/pull/6566

sdankel avatar Sep 18 '24 17:09 sdankel

It looks like this is the first instance they failed on master: https://github.com/FuelLabs/sway/actions/runs/10812086601/job/29992938006

From this PR: https://github.com/FuelLabs/sway/pull/6526

cc @xunilrj

sdankel avatar Sep 18 '24 20:09 sdankel

Confirmed that changing this section of code back fixes the compiler error. I'm not sure if this is the best fix though. Thoughts?

image

sdankel avatar Sep 18 '24 21:09 sdankel