-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
#7580 fixes several issues related to self impl Contracts, but not all of them. This is the list of remaining known issues in the impl Contract implementation.
-
Using
pubkeyword onfnandconstitems must emit the "Unnecessary visibility qualifier,pubis implied here." error. -
impl Contractmust be allowed only incontractproject types. Currently we can have, e.g.,library; impl Contract { }
This seams to be a general issue. Having
impl Abi for Contract { ... }in non-contract projects currently does not render errors. -
Clashing of the generated ABI name
<normalized project name>Abiwith existing names. Here we need to decide on the approach. Is<normalized project name>Abia reserved name? What if it exists in some of the dependencies in some module? -
Support for multiple
impl Contract { ... }blocks. Currently, we will get confusing compilation errors on name clashing since for each block we insert<normalized project name>Abiinto the namespace. Solution for this and the previous point needs to be considered together. -
Removing
Abisuffix from the generated ABI name. HavingAbisuffix is against Sway conventions for naming ABIs. Note that this change is a breaking change and should come with aforc migratemigration that changes all usages of<normalized project name>Abiwith<normalized project name>.