feat[ux]: allow "compiling" .vyi files#4290
feat[ux]: allow "compiling" .vyi files#4290charles-cooper merged 47 commits intovyperlang:masterfrom
.vyi files#4290Conversation
.vyi files
|
looking good to me. @cyberthirst can you take a look? |
|
bit unrelated, but if an interface
|
|
|
Not intended. May be the order in which we merged flag and |
|
shouldn't import ITest2
implements: ITest2
def bar() -> uint256:
...
def foo() -> uint8:
...
def foobar() -> uint8:
...outputs: # Functions
@external
def bar() -> uint256:
...
@external
def foo() -> uint8:
...
@external
def foobar() -> uint8:
...
ie |
also, if |
|
|
||
| """ | ||
| file = make_file("interface.vyi", interface) | ||
| compile_files([file], ["ast", "annotated_ast", "interface", "external_interface", "abi"]) |
There was a problem hiding this comment.
would it make sense to use this here? https://github.com/vyperlang/vyper/pull/4290/files#diff-d428d4c971c9f7166899f6f2d3da5e17ca4478d8d371d803e735d6ee36b39d30R49
so we don't have to maintain the list on 2 places
name discrepancy - Itest vs ITest |
| # ex: test_interface.vy -> TestInterface | ||
| name = "".join([x.capitalize() for x in stem.split("_")]) | ||
|
|
||
| name = stem.title().replace("_", "") |
| out = compile_code(code, contract_path="test__test.vyi", output_formats=["external_interface"])[ | ||
| "external_interface" | ||
| ] | ||
| assert "-> Foo:" in out |
There was a problem hiding this comment.
maybe we should also check that the output compiles again (similar to a round trip)
There was a problem hiding this comment.
I've added that check for primitive types, for external interface it does not work with user defined ones.
| compile_code(out, contract_path="test.vyi", output_formats=["external_interface"]) | ||
|
|
||
|
|
||
| @pytest.mark.xfail |
.vyi files.vyi files
What I did
fix #4232
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture