-
Notifications
You must be signed in to change notification settings - Fork 5.4k
contract self implementation #7030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thanks for the contribution! Before we can merge this, we need @hey-ewan to sign the Fuel Labs Contributor License Agreement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs some tests to validate that it even works.
CodSpeed Performance ReportMerging #7030 will not alter performanceComparing Summary
|
@IGI-111 I added to the tests in the feature generates a unique anonymous ABI with name simply put, the compiler takes an input like this: impl Contract {
fn foo() -> u64 { 0 }
} and generates this equivalent code: abi __AnonymousAbi_1 {
fn foo() -> u64;
}
impl __AnonymousAbi_1 for Contract {
fn foo() -> u64 { 0 }
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you're mistaken about the structure of tests in this repository.
forc-test
is a test runner utility similar to cargo-test
and has nothing to do with such language changes. Your test should not affect that folder at all, and should live in test/src/e2e_vm_tests/test_programs/should_pass
37f805c
to
a09c390
Compare
prevents compiler issue: `Identifiers cannot begin with a double underscore, as that naming convention is reserved for compiler intrinsics.`
I've removed the test from I also renamed |
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/contract_abi_auto_impl/Forc.toml
Show resolved
Hide resolved
Co-authored-by: IGI-111 <[email protected]>
@IGI-111, after doing some digging with the tests, I figured out that the |
Would be possible for the Abi to be named as the project is in Forc.toml? Probably changing the case to upper camel case. "_Anonymous_Abi" sound strange. We use underscore only for intrinsics. If we only have one "impl", we don't need a suffix I think. |
Are we propagating all fn attributes like "read", "write" and others? I am seeing some "Attributes::default()" in the changes. I think we should enable "validate_abi" in the "test.toml", like others tests do. |
@xunilrj so I tried using the |
Description
close: #5905
Checklist
Breaking*
orNew Feature
labels where relevant.