FuelLabs / FuelLabs/sway

Trait Coherence bug

Open
#6,232 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
61.4k
Forks
5.4k
Avg merge
3h 33m
Merged PRs (30d)
4

Description

### Context

A contract calls another contract to return a struct.
This results in an error message indicating that `AbiDecode` trait must be implemented.
Upon implementing a template `AbiDecode` trait the subsequent `forc build` errors with a `Trait Coherence` error meaning the attached repo cannot be built with or without the trait - blocking production in a deadlock.

Check out the following minimal repo which pins the version to `0.60.0`

https://github.com/Braqzen/sway-trait-coherence-bug

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue in the linked minimal repository, which pins Sway to 0.60.0, and run forc build with and without the template AbiDecode implementation. Trace the resulting AbiDecode and Trait Coherence errors; done means the repository can build without the deadlock described in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.