Merge pull request #10994 from ethereum/remove-remains-of-ast-json-option

Remove the last remains of --ast-json option
This commit is contained in:
Harikrishnan Mulackal 2021-02-24 10:21:30 +01:00 committed by GitHub
commit 58e0977647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 7 deletions

View File

@ -17,7 +17,7 @@ Basic Usage
One of the build targets of the Solidity repository is ``solc``, the solidity commandline compiler. One of the build targets of the Solidity repository is ``solc``, the solidity commandline compiler.
Using ``solc --help`` provides you with an explanation of all options. The compiler can produce various outputs, ranging from simple binaries and assembly over an abstract syntax tree (parse tree) to estimations of gas usage. Using ``solc --help`` provides you with an explanation of all options. The compiler can produce various outputs, ranging from simple binaries and assembly over an abstract syntax tree (parse tree) to estimations of gas usage.
If you only want to compile a single file, you run it as ``solc --bin sourceFile.sol`` and it will print the binary. If you want to get some of the more advanced output variants of ``solc``, it is probably better to tell it to output everything to separate files using ``solc -o outputDirectory --bin --ast-json --asm sourceFile.sol``. If you only want to compile a single file, you run it as ``solc --bin sourceFile.sol`` and it will print the binary. If you want to get some of the more advanced output variants of ``solc``, it is probably better to tell it to output everything to separate files using ``solc -o outputDirectory --bin --ast-compact-json --asm sourceFile.sol``.
Optimizer Options Optimizer Options
----------------- -----------------

View File

@ -120,7 +120,6 @@ static string const g_strAsm = "asm";
static string const g_strAsmJson = "asm-json"; static string const g_strAsmJson = "asm-json";
static string const g_strAssemble = "assemble"; static string const g_strAssemble = "assemble";
static string const g_strAst = "ast"; static string const g_strAst = "ast";
static string const g_strAstJson = "ast-json";
static string const g_strAstCompactJson = "ast-compact-json"; static string const g_strAstCompactJson = "ast-compact-json";
static string const g_strBinary = "bin"; static string const g_strBinary = "bin";
static string const g_strBinaryRuntime = "bin-runtime"; static string const g_strBinaryRuntime = "bin-runtime";
@ -203,7 +202,6 @@ static string const g_argAsm = g_strAsm;
static string const g_argAsmJson = g_strAsmJson; static string const g_argAsmJson = g_strAsmJson;
static string const g_argAssemble = g_strAssemble; static string const g_argAssemble = g_strAssemble;
static string const g_argAstCompactJson = g_strAstCompactJson; static string const g_argAstCompactJson = g_strAstCompactJson;
static string const g_argAstJson = g_strAstJson;
static string const g_argBinary = g_strBinary; static string const g_argBinary = g_strBinary;
static string const g_argBinaryRuntime = g_strBinaryRuntime; static string const g_argBinaryRuntime = g_strBinaryRuntime;
static string const g_argCombinedJson = g_strCombinedJson; static string const g_argCombinedJson = g_strCombinedJson;
@ -318,7 +316,6 @@ static bool needsHumanTargetedStdout(po::variables_map const& _args)
g_argAbi, g_argAbi,
g_argAsm, g_argAsm,
g_argAsmJson, g_argAsmJson,
g_argAstJson,
g_argBinary, g_argBinary,
g_argBinaryRuntime, g_argBinaryRuntime,
g_argMetadata, g_argMetadata,
@ -974,7 +971,6 @@ General Information)").c_str(),
po::options_description outputComponents("Output Components"); po::options_description outputComponents("Output Components");
outputComponents.add_options() outputComponents.add_options()
(g_argAstJson.c_str(), "AST of all source files in JSON format.")
(g_argAstCompactJson.c_str(), "AST of all source files in a compact JSON format.") (g_argAstCompactJson.c_str(), "AST of all source files in a compact JSON format.")
(g_argAsm.c_str(), "EVM assembly of the contracts.") (g_argAsm.c_str(), "EVM assembly of the contracts.")
(g_argAsmJson.c_str(), "EVM assembly of the contracts in JSON format.") (g_argAsmJson.c_str(), "EVM assembly of the contracts in JSON format.")

View File

@ -465,12 +465,12 @@ SOLTMPDIR=$(mktemp -d)
# This should not fail # This should not fail
set +e set +e
output=$(echo '' | "$SOLC" --ast-json - 2>/dev/null) output=$(echo '' | "$SOLC" --ast-compact-json - 2>/dev/null)
result=$? result=$?
set -e set -e
if [[ $result != 0 ]] if [[ $result != 0 ]]
then then
printError "Incorrect response to --ast-json option with empty stdin" printError "Incorrect response to --ast-compact-json option with empty stdin"
exit 1 exit 1
fi fi
) )