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: ir and metadata outputs for vyper-json #2600

Merged
merged 4 commits into from Jan 12, 2022

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Jan 12, 2022

What I did

How I did it

How to verify it

try vyper-json on the following

$ cat tmp/meta.json 
{
    "language": "Vyper",
    "sources": {
        "bar.vy": { "content": "@external\ndef foo():\n   pass"}
    },
    "settings": {
        "optimize": true,
        "outputSelection": {
            "*": ["ir", "metadata", "abi", "ast"]
        }
    }
}

Description for the changelog

Cute Animal Picture

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

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine

@@ -121,7 +121,7 @@ def test_source_ids_increment():
def test_outputs():
result, _ = compile_from_input_dict(INPUT_JSON)
assert sorted(result.keys()) == ["contracts/bar.vy", "contracts/foo.vy"]
assert sorted(result["contracts/bar.vy"].keys()) == sorted(TRANSLATE_MAP.values())
assert sorted(result["contracts/bar.vy"].keys()) == sorted(set(TRANSLATE_MAP.values()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there duplicates in TRANSLATE_MAP?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there duplicates in TRANSLATE_MAP?

yes - I made ir and ir_json both map to ir_json (it doesn't really make sense to get regular ir output for vyper-json when a json version is available).

@charles-cooper charles-cooper enabled auto-merge (squash) January 12, 2022 18:23
@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2022

Codecov Report

Merging #2600 (3b7633a) into master (13af26b) will increase coverage by 0.03%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2600      +/-   ##
==========================================
+ Coverage   86.61%   86.65%   +0.03%     
==========================================
  Files          91       91              
  Lines        9430     9433       +3     
  Branches     2357     2358       +1     
==========================================
+ Hits         8168     8174       +6     
+ Misses        776      774       -2     
+ Partials      486      485       -1     
Impacted Files Coverage Δ
vyper/compiler/__init__.py 87.17% <ø> (ø)
vyper/cli/vyper_json.py 85.43% <62.50%> (+0.17%) ⬆️
vyper/builtin_functions/functions.py 88.60% <0.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13af26b...3b7633a. Read the comment docs.

@charles-cooper charles-cooper merged commit dd3dcb8 into vyperlang:master Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants