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

feat[tool]: add all imported modules to -f annotated_ast output #4209

Merged
merged 14 commits into from
Oct 10, 2024

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Aug 11, 2024

What I did

How I did it

How to verify it

Commit message

this commit adds all imported modules to `-f annotated_ast`
output. this includes recursively imported modules. this is a tooling
feature, so that tools don't need to invoke the compiler multiple
and inspect import statements in order to find the ASTs for imported
modules.

Description for the changelog

Cute Animal Picture

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

vyper/compiler/output.py Fixed Show fixed Hide fixed
@charles-cooper charles-cooper marked this pull request as ready for review August 11, 2024 04:27
Copy link

codecov bot commented Aug 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.82%. Comparing base (fdc05d6) to head (2994676).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4209      +/-   ##
==========================================
- Coverage   91.35%   88.82%   -2.53%     
==========================================
  Files         110      110              
  Lines       15789    15810      +21     
  Branches     2674     2678       +4     
==========================================
- Hits        14424    14044     -380     
- Misses        931     1256     +325     
- Partials      434      510      +76     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# come from multiple InputBundles (particularly builtin interfaces),
# so source_id is not guaranteed to be unique.
if ast.resolved_path in unique_modules:
# sanity check -- object equality
Copy link
Collaborator

Choose a reason for hiding this comment

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

is operator checks for identity, not equality

Copy link
Member Author

Choose a reason for hiding this comment

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

yea, that's what I meant by object ("pointer") equality

@cyberthirst
Copy link
Collaborator

can we add a test for recursive imports?

@charles-cooper
Copy link
Member Author

can we add a test for recursive imports?

would you mind helping contribute these?

@charles-cooper charles-cooper added this to the v0.4.1 milestone Oct 4, 2024
@cyberthirst
Copy link
Collaborator

cyberthirst commented Oct 10, 2024

with #4229 we could add the imports also to -f ast, right?

edit: fixed link

@charles-cooper
Copy link
Member Author

with #4229 we could add the imports also to -f ast, right?

edit: fixed link

yes, we could

@charles-cooper charles-cooper enabled auto-merge (squash) October 10, 2024 23:18
@charles-cooper charles-cooper merged commit 4845fd4 into vyperlang:master Oct 10, 2024
157 of 158 checks passed
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.

4 participants