From cfd795ca0c4babfeff1bc96df5645c920ff1b87f Mon Sep 17 00:00:00 2001 From: Thomas Bocek Date: Wed, 5 Dec 2018 08:50:28 +0100 Subject: [PATCH] When updating to solidity 0.5.0, solc compiling with ethereumj does not work anymore as using stdin requires an explicit "-". For older solc version "-" is not an issue as it is accepted as well. --- .../org/ethereum/solidity/compiler/SolidityCompiler.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ethereumj-core/src/main/java/org/ethereum/solidity/compiler/SolidityCompiler.java b/ethereumj-core/src/main/java/org/ethereum/solidity/compiler/SolidityCompiler.java index 9905db0527..6f07b64982 100644 --- a/ethereumj-core/src/main/java/org/ethereum/solidity/compiler/SolidityCompiler.java +++ b/ethereumj-core/src/main/java/org/ethereum/solidity/compiler/SolidityCompiler.java @@ -306,6 +306,14 @@ private static List getElementsOf(Class clazz, Option... options) { public Result compileSrc(byte[] source, boolean optimize, boolean combinedJson, Option... options) throws IOException { List 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",