Remove --old-reporter from solc

This commit is contained in:
Alex Beregszaszi 2020-10-30 21:11:29 +00:00 committed by chriseth
parent edfae1ed05
commit 1126838a31
2 changed files with 8 additions and 22 deletions

View File

@ -4,6 +4,7 @@ Breaking Changes:
* Assembler: The artificial ASSIGNIMMUTABLE opcode and the corresponding builtin in the "EVM with object access" dialect of Yul take the base offset of the code to modify as additional argument.
* Code Generator: All arithmetic is checked by default. These checks can be disabled using ``unchecked { ... }``.
* Code Generator: Cause a panic if a byte array in storage is accessed whose length is encoded incorrectly.
* Command Line Interface: Remove the ``--old-reporter`` option.
* Command Line Interface: Remove the legacy ``--ast-json`` option. Only the ``--ast-compact-json`` option is supported now.
* General: Remove global functions ``log0``, ``log1``, ``log2``, ``log3`` and ``log4``.
* Standard JSON: Remove the ``legacyAST`` option.

View File

@ -45,7 +45,6 @@
#include <liblangutil/Exceptions.h>
#include <liblangutil/Scanner.h>
#include <liblangutil/SourceReferenceFormatter.h>
#include <liblangutil/SourceReferenceFormatterHuman.h>
#include <libsmtutil/Exceptions.h>
@ -189,7 +188,6 @@ static string const g_strIgnoreMissingFiles = "ignore-missing";
static string const g_strColor = "color";
static string const g_strNoColor = "no-color";
static string const g_strErrorIds = "error-codes";
static string const g_strOldReporter = "old-reporter";
static string const g_argAbi = g_strAbi;
static string const g_argPrettyJson = g_strPrettyJson;
@ -238,7 +236,6 @@ static string const g_argIgnoreMissingFiles = g_strIgnoreMissingFiles;
static string const g_argColor = g_strColor;
static string const g_argNoColor = g_strNoColor;
static string const g_argErrorIds = g_strErrorIds;
static string const g_argOldReporter = g_strOldReporter;
/// Possible arguments to for --combined-json
static set<string> const g_combinedJsonArgs
@ -939,10 +936,6 @@ General Information)").c_str(),
g_argErrorIds.c_str(),
"Output error codes."
)
(
g_argOldReporter.c_str(),
"Enables old diagnostics reporter (legacy option, will be removed)."
)
;
desc.add(outputFormatting);
@ -1454,11 +1447,7 @@ bool CommandLineInterface::processInput()
m_compiler = make_unique<CompilerStack>(fileReader);
unique_ptr<SourceReferenceFormatter> formatter;
if (m_args.count(g_argOldReporter))
formatter = make_unique<SourceReferenceFormatter>(serr(false));
else
formatter = make_unique<SourceReferenceFormatterHuman>(serr(false), m_coloredOutput, m_withErrorIds);
SourceReferenceFormatterHuman formatter(serr(false), m_coloredOutput, m_withErrorIds);
try
{
@ -1518,7 +1507,7 @@ bool CommandLineInterface::processInput()
if (!m_compiler->analyze())
{
for (auto const& error: m_compiler->errors())
formatter->printErrorInformation(*error);
formatter.printErrorInformation(*error);
astAssert(false, "Analysis of the AST failed");
}
}
@ -1540,7 +1529,7 @@ bool CommandLineInterface::processInput()
for (auto const& error: m_compiler->errors())
{
g_hasOutput = true;
formatter->printErrorInformation(*error);
formatter.printErrorInformation(*error);
}
if (!successful)
@ -1554,7 +1543,7 @@ bool CommandLineInterface::processInput()
catch (CompilerError const& _exception)
{
g_hasOutput = true;
formatter->printExceptionInformation(_exception, "Compiler error");
formatter.printExceptionInformation(_exception, "Compiler error");
return false;
}
catch (InternalCompilerError const& _exception)
@ -1588,7 +1577,7 @@ bool CommandLineInterface::processInput()
else
{
g_hasOutput = true;
formatter->printExceptionInformation(_error, _error.typeName());
formatter.printExceptionInformation(_error, _error.typeName());
}
return false;
@ -1883,16 +1872,12 @@ bool CommandLineInterface::assemble(
for (auto const& sourceAndStack: assemblyStacks)
{
auto const& stack = sourceAndStack.second;
unique_ptr<SourceReferenceFormatter> formatter;
if (m_args.count(g_argOldReporter))
formatter = make_unique<SourceReferenceFormatter>(serr(false));
else
formatter = make_unique<SourceReferenceFormatterHuman>(serr(false), m_coloredOutput, m_withErrorIds);
SourceReferenceFormatterHuman formatter(serr(false), m_coloredOutput, m_withErrorIds);
for (auto const& error: stack.errors())
{
g_hasOutput = true;
formatter->printErrorInformation(*error);
formatter.printErrorInformation(*error);
}
if (!Error::containsOnlyWarnings(stack.errors()))
successful = false;