ethereum / ethereum/populus

solidity compiler settings in project.json don't work as expected

Open
#468 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
319
Forks
110
PR merge metrics
No merged PRs in 30d

Description

* Populus Version: on master
* OS: OSx

### What was wrong?
providing any `command_line` option like `evm_version` in the example below doesn't work
```
"SolcAutoBackend": {
"class": "populus.compilation.backends.SolcAutoBackend",
"settings": {
"optimize": true,
"command_line_options": {
"allow_paths": "/",
"evm_version": "homestead"
}
}
```
This is because populus uses `standard-json` as input to `py-solc`:
https://github.com/ethereum/populus/blob/c256cbac0e343a1ce477a2e6128ef6a6c77b8c3c/populus/compilation/backends/solc_standard_json.py#L134-L145
Whenever `standard-json` is passed to `py-solc` all other options are ignored.
```
$solc --help
...
--standard-json Switch to Standard JSON input / output mode, ignoring
all options. It reads from standard input and provides
the result on the standard output.
...
````

#### Cute Animal Picture

![](https://peepeth.s3-us-west-1.amazonaws.com/images/peep_pics/yZz12Hfg/large.jpg?1528219219)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in populus/compilation/backends/solc_standard_json.py at the referenced lines and reproduce the project.json configuration with command_line_options such as evm_version. Trace how py-solc receives standard-json input and verify that the requested compiler settings are honored rather than ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, solidity
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.