Trait Coherence bug
- 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