Skip to content

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

Merged
charles-cooper merged 14 commits intovyperlang:masterfrom
charles-cooper:feat/export-ast
Oct 10, 2024
Merged

feat[tool]: add all imported modules to -f annotated_ast output#4209
charles-cooper merged 14 commits intovyperlang:masterfrom
charles-cooper:feat/export-ast

Conversation

@charles-cooper
Copy link
Copy Markdown
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-->

@charles-cooper charles-cooper marked this pull request as ready for review August 11, 2024 04:27
@codecov
Copy link
Copy Markdown

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 66 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

can we add a test for recursive imports?

@charles-cooper
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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.

5 participants