Skip to content

Commit

Permalink
When updating to solidity 0.5.0, solc compiling with ethereumj does not
Browse files Browse the repository at this point in the history
work anymore as using stdin requires an explicit "-". For older solc
version "-" is not an issue as it is accepted as well.
  • Loading branch information
tbocek committed Dec 5, 2018
1 parent c8177a3 commit cfd795c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ private static <T> List<T> getElementsOf(Class<T> clazz, Option... options) {
public Result compileSrc(byte[] source, boolean optimize, boolean combinedJson, Option... options) throws IOException {
List<String> commandParts = prepareCommandOptions(optimize, combinedJson, options);

//new in solidity 0.5.0: using stdin requires an explicit "-". The following output
//of 'solc' if no file is provided, e.g.,: solc --combined-json abi,bin,interface,metadata
//
// No input files given. If you wish to use the standard input please specify "-" explicitly.
//
// For older solc version "-" is not an issue as it is accepet as well
commandParts.add("-");

ProcessBuilder processBuilder = new ProcessBuilder(commandParts)
.directory(solc.getExecutable().getParentFile());
processBuilder.environment().put("LD_LIBRARY_PATH",
Expand Down

0 comments on commit cfd795c

Please sign in to comment.