-
Notifications
You must be signed in to change notification settings - Fork 29
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
Use native compilers for AST building #143
Conversation
…for AST building and processing. Tweaked executable and tests to be compatible with async execution.
…variable SCRIBBLE_DEFAULT_COMPILER_KIND
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.
Just 1 question and 2 nits. Will fix then its shortly
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.
lgtm
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.
After discussion with @blitz-1306 we decided to make the logic for selecting default compiler kind a little more robust. Specifically the selection logic should be:
- If there is
--compiler-kind
specified use that - Otherwise if there is an env variable
SCRIBBLE_DEFAULT_COMPILER_KIND
, then use that - Finally if no options are given use
CompilerKind.Native
IF the return value ofgetCompilerPrefixForOs()
is one of the 3 supported platforms -"linux-amd64"
,"windows-amd64"
and"macosx-amd64"
. Otherwise we useCompilerKind.WASM
.
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.
LGTM
Codecov Report
@@ Coverage Diff @@
## develop #143 +/- ##
===========================================
+ Coverage 86.68% 86.70% +0.02%
===========================================
Files 72 72
Lines 5203 5190 -13
Branches 1192 1191 -1
===========================================
- Hits 4510 4500 -10
+ Misses 420 417 -3
Partials 273 273
Continue to review full report at Codecov.
|
Preface
This PR allows to use native Solidity compilers to build and process AST.
Changes
--compiler-kind
and environment variableSCRIBBLE_DEFAULT_COMPILER_KIND
. Precedence is following:--compiler-kind
is primary;SCRIBBLE_DEFAULT_COMPILER_KIND
is secondary;getCompilerPrefixForOs()
result is one oflinux-amd64
,windows-amd64
ormacosx-amd64
, thenCompilerKind.Native
. Otherwise the fallback value isCompilerKind.WASM
.async
execution.Notes
./
prefix to all relative input paths, including entry file path. Such behavior affected a lot of artifacts and snapshots, so it probably would also affect dependent components. We better to assess possible implications of this change and consider if it worth fixing in the solc-typed-ast itself.Regards.