Skip to content
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

fix[tool]: fix output formats for .vyz files #4338

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

charles-cooper
Copy link
Member

run the format name through the translate map. for instance, -f annotated_ast was not working for .vyz files.

What I did

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

run the format name through the translate map. for instance,
`-f annotated_ast` was not working for `.vyz` files.
@charles-cooper charles-cooper added this to the v0.4.1 milestone Oct 28, 2024
@charles-cooper charles-cooper added the release - must release blocker label Oct 28, 2024
@cyberthirst
Copy link
Collaborator

cyberthirst commented Nov 1, 2024

let's add this

def test_archive_compile_options(input_files):
    tmpdir, _, _, contract_file = input_files
    search_paths = [".", tmpdir]

    options = ["abi_python", "json", "ast", "annotated_ast", "ir_json"]

    for option in options:
        out = compile_files([contract_file], ["archive_b64", option], paths=search_paths)

        archive_b64 = out[contract_file].pop("archive_b64")

        archive_path = Path("foo.zip.b64")
        with archive_path.open("w") as f:
            f.write(archive_b64)

        # compare compiling the two input bundles
        out2 = compile_files([archive_path], [option])

        if option in ["ast", "annotated_ast"]:
            # would have to normalize paths and imports, so just verify it compiles
            continue

        assert out[contract_file] == out2[archive_path]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release - must release blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants