Skip to content

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

@voith

Description

@voith
  • 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:

std_input = {
'language': 'Solidity',
'sources': sources,
'settings': {
'remappings': import_remappings,
'outputSelection': {
'*': {
'*': REQUIRED_OUTPUT_SELECTION
}
}
}
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions