From 7915f328529f551219febb838a0fb82911bb09fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 30 Sep 2021 16:17:36 +0200 Subject: [PATCH] Remove leftovers of compact-format and interface from --combined-json --- scripts/ASTImportTest.sh | 4 ++-- scripts/common_cmdline.sh | 2 +- solc/CommandLineInterface.h | 2 +- solc/CommandLineParser.cpp | 6 +----- test/cmdlineTests/ast_json_import_wrong_evmVersion/args | 2 +- test/stopAfterParseTests.sh | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/ASTImportTest.sh b/scripts/ASTImportTest.sh index ba8f33d3c..daf5a6163 100755 --- a/scripts/ASTImportTest.sh +++ b/scripts/ASTImportTest.sh @@ -45,9 +45,9 @@ function testImportExportEquivalence { ! [[ -e stderr.txt ]] || { echo "stderr.txt already exists. Refusing to overwrite."; exit 1; } # save exported json as expected result (silently) - $SOLC --combined-json ast,compact-format --pretty-json "$nth_input_file" "${all_input_files[@]}" > expected.json 2> /dev/null + $SOLC --combined-json ast --pretty-json "$nth_input_file" "${all_input_files[@]}" > expected.json 2> /dev/null # import it, and export it again as obtained result (silently) - if ! $SOLC --import-ast --combined-json ast,compact-format --pretty-json expected.json > obtained.json 2> stderr.txt + if ! $SOLC --import-ast --combined-json ast --pretty-json expected.json > obtained.json 2> stderr.txt then # For investigating, use exit 1 here so the script stops at the # first failing test diff --git a/scripts/common_cmdline.sh b/scripts/common_cmdline.sh index 59c334a4b..6718ca5b5 100644 --- a/scripts/common_cmdline.sh +++ b/scripts/common_cmdline.sh @@ -20,7 +20,7 @@ # ------------------------------------------------------------------------------ YULARGS=(--strict-assembly) -FULLARGS=(--optimize --ignore-missing --combined-json "abi,asm,ast,bin,bin-runtime,compact-format,devdoc,hashes,interface,metadata,opcodes,srcmap,srcmap-runtime,userdoc") +FULLARGS=(--optimize --ignore-missing --combined-json "abi,asm,ast,bin,bin-runtime,devdoc,hashes,metadata,opcodes,srcmap,srcmap-runtime,userdoc") OLDARGS=(--optimize --combined-json "abi,asm,ast,bin,bin-runtime,devdoc,interface,metadata,opcodes,srcmap,srcmap-runtime,userdoc") function compileFull() { diff --git a/solc/CommandLineInterface.h b/solc/CommandLineInterface.h index 582b8f2a4..5504e51bb 100644 --- a/solc/CommandLineInterface.h +++ b/solc/CommandLineInterface.h @@ -95,7 +95,7 @@ private: /// Tries to read @ m_sourceCodes as a JSONs holding ASTs /// such that they can be imported into the compiler (importASTs()) - /// (produced by --combined-json ast,compact-format + /// (produced by --combined-json ast /// or standard-json output std::map parseAstFromInput(); diff --git a/solc/CommandLineParser.cpp b/solc/CommandLineParser.cpp index 059a15a5f..ad6a32f6d 100644 --- a/solc/CommandLineParser.cpp +++ b/solc/CommandLineParser.cpp @@ -63,7 +63,6 @@ static string const g_strAstCompactJson = "ast-compact-json"; static string const g_strBinary = "bin"; static string const g_strBinaryRuntime = "bin-runtime"; static string const g_strCombinedJson = "combined-json"; -static string const g_strCompactJSON = "compact-format"; static string const g_strErrorRecovery = "error-recovery"; static string const g_strEVM = "evm"; static string const g_strEVMVersion = "evm-version"; @@ -75,7 +74,6 @@ static string const g_strGas = "gas"; static string const g_strHelp = "help"; static string const g_strImportAst = "import-ast"; static string const g_strInputFile = "input-file"; -static string const g_strInterface = "interface"; static string const g_strYul = "yul"; static string const g_strYulDialect = "yul-dialect"; static string const g_strIR = "ir"; @@ -146,12 +144,10 @@ static set const g_combinedJsonArgs g_strAst, g_strBinary, g_strBinaryRuntime, - g_strCompactJSON, g_strFunDebug, g_strFunDebugRuntime, g_strGeneratedSources, g_strGeneratedSourcesRuntime, - g_strInterface, g_strMetadata, g_strNatspecUser, g_strNatspecDev, @@ -627,7 +623,7 @@ General Information)").c_str(), g_strImportAst.c_str(), ("Import ASTs to be compiled, assumes input holds the AST in compact JSON format. " "Supported Inputs is the output of the --" + g_strStandardJSON + " or the one produced by " - "--" + g_strCombinedJson + " " + g_strAst + "," + g_strCompactJSON).c_str() + "--" + g_strCombinedJson + " " + g_strAst).c_str() ) ; desc.add(alternativeInputModes); diff --git a/test/cmdlineTests/ast_json_import_wrong_evmVersion/args b/test/cmdlineTests/ast_json_import_wrong_evmVersion/args index 87444708c..d8fddfec6 100644 --- a/test/cmdlineTests/ast_json_import_wrong_evmVersion/args +++ b/test/cmdlineTests/ast_json_import_wrong_evmVersion/args @@ -1 +1 @@ ---evm-version=homestead --import-ast --combined-json ast,compact-format --pretty-json +--evm-version=homestead --import-ast --combined-json ast --pretty-json diff --git a/test/stopAfterParseTests.sh b/test/stopAfterParseTests.sh index 8df15e842..a100146b0 100755 --- a/test/stopAfterParseTests.sh +++ b/test/stopAfterParseTests.sh @@ -18,7 +18,7 @@ cd "$FILETMP" || exit 1 function testFile() { set +e - ALLOUTPUT=$($SOLC --combined-json ast,compact-format --pretty-json "$@" --stop-after parsing 2>&1) + ALLOUTPUT=$($SOLC --combined-json ast --pretty-json "$@" --stop-after parsing 2>&1) local RESULT=$? set -e if test ${RESULT} -ne 0; then