Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: contract flattener #107
feat: contract flattener #107
Changes from 17 commits
db80707
3b31d36
27d8459
47c72e9
f60304e
d319096
dff651b
b63aad7
6810466
76ce04a
a2372e0
fd0fa45
3e2e373
c043237
5a3273d
46950ea
1f5df04
d3a3855
4dd79be
7dd8303
b382eef
8a063e4
b6af43c
f39f231
93f82e2
4af831e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from testing: I think
OUTFILE
is very un-unix like, especially because it is required.As a CLI user, I would expect this to work:
or also, having it output to stdout is kinda nice too:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can achieve this by changing the impl to:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we try to find an already matching installed version (
self.installed_versions
) before checking the available versions?I should be able to compile offline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's like 3 places that do this logic slightly differently. Would probably be good to refactor this a bit at some point. Not sure I have enough context to do that now so I'm leaving it alone.
How about 4af831e?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just double checked, it seems I am still able to compile without internet if I have the compiler installed, so that is good.
However, just to keep in mind:
1.) Turn off wifi.
2.) Launch
ape console
.3.) Run:
compilers.vyper.available_versions
.Notice it fails with:
If the line
self.available_versions
is executed without internet and catching the exception, the program will crashThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's okay in this case. If there's no useful installed versions and we can't get available versions, then there's no path forward and we should bail, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct.