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: search path resolution for cli #3694

Merged
merged 2 commits into from
Dec 16, 2023

Conversation

charles-cooper
Copy link
Member

the current behavior is that the current directory does not get into the search path when -p is specified, which is annoying. (one would expect vyper some/directory/some/file.vy to compile no matter what -p is specified as).

this commit also handles the addition of multiple search paths specified on the CLI, and adds a long --path option as an alternative to -p.

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-->

the current behavior is that the current directory does *not* get into
the search path when `-p` is specified, which is annoying. (one would
expect `vyper some/directory/some/file.vy` to compile no matter what
`-p` is specified as).

this commit also handles the addition of multiple search paths specified
on the CLI, and adds a long `--path` option as an alternative to `-p`.
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.

Anyway to test the faulty behavior?

@charles-cooper
Copy link
Member Author

Anyway to test the faulty behavior?

yep!

  1. check out snekmate
  2. create some file like test/utils/ECDSA.t.vy which imports from utils import ECDSA
  3. run from current master: vyper -p src/ test/utils/ECDSA.t.vy (complains with file not found)

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c6f457a) 84.01% compared to head (80314b7) 83.98%.
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3694      +/-   ##
==========================================
- Coverage   84.01%   83.98%   -0.03%     
==========================================
  Files          92       92              
  Lines       13044    13046       +2     
  Branches     2928     2928              
==========================================
- Hits        10959    10957       -2     
- Misses       1653     1657       +4     
  Partials      432      432              

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

@charles-cooper charles-cooper enabled auto-merge (squash) December 16, 2023 18:13
@charles-cooper charles-cooper merged commit b0ea5b6 into vyperlang:master Dec 16, 2023
84 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