Merge pull request #7972 from ethereum/ABIEncoderV2Wording

Do not call ABIEncoderV2 or the Yul optimizer experimental.
This commit is contained in:
chriseth 2019-12-12 12:44:53 +01:00 committed by GitHub
commit fce9d4bca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 23 additions and 22 deletions

View File

@ -70,10 +70,12 @@ ABIEncoderV2
~~~~~~~~~~~~
The new ABI encoder is able to encode and decode arbitrarily nested
arrays and structs. It produces less optimal code (the optimizer
for this part of the code is still under development) and has not
received as much testing as the old encoder. You can activate it
using ``pragma experimental ABIEncoderV2;``.
arrays and structs. It might produce less optimal code and has not
received as much testing as the old encoder, but is considered
non-experimental as of Solidity 0.6.0. You still have to explicitly
activate it using ``pragma experimental ABIEncoderV2;`` - we kept
the same pragma, even though it is not considered experimental
anymore.
.. _smt_checker:

View File

@ -222,7 +222,6 @@ Input Description
"constantOptimizer": false,
// The new Yul optimizer. Mostly operates on the code of ABIEncoderV2.
// It can only be activated through the details here.
// This feature is still considered experimental.
"yul": false,
// Tuning options for the Yul optimizer.
"yulDetails": {

View File

@ -416,7 +416,7 @@ void ContractLevelChecker::checkBaseABICompatibility(ContractDefinition const& _
for (TypePointer const& paramType: func.second->parameterTypes() + func.second->parameterTypes())
if (!TypeChecker::typeSupportedByOldABIEncoder(*paramType, false))
{
errors.append("Type only supported by the new experimental ABI encoder", currentLoc);
errors.append("Type only supported by ABIEncoderV2", currentLoc);
break;
}
}
@ -427,7 +427,7 @@ void ContractLevelChecker::checkBaseABICompatibility(ContractDefinition const& _
errors,
std::string("Contract \"") +
_contract.name() +
"\" does not use the new experimental ABI encoder but wants to inherit from a contract " +
"\" does not use ABIEncoderV2 but wants to inherit from a contract " +
"which uses types that require it. " +
"Use \"pragma experimental ABIEncoderV2;\" for the inheriting contract as well to enable the feature."
);

View File

@ -380,7 +380,7 @@ bool TypeChecker::visit(FunctionDefinition const& _function)
)
m_errorReporter.typeError(
var.location(),
"This type is only supported in the new experimental ABI encoder. "
"This type is only supported in ABIEncoderV2. "
"Use \"pragma experimental ABIEncoderV2;\" to enable the feature."
);
};
@ -509,7 +509,7 @@ bool TypeChecker::visit(VariableDeclaration const& _variable)
unsupportedTypes.emplace_back(param->toString());
if (!unsupportedTypes.empty())
m_errorReporter.typeError(_variable.location(),
"The following types are only supported for getters in the new experimental ABI encoder: " +
"The following types are only supported for getters in ABIEncoderV2: " +
joinHumanReadable(unsupportedTypes) +
". Either remove \"public\" or use \"pragma experimental ABIEncoderV2;\" to enable the feature."
);
@ -620,7 +620,7 @@ bool TypeChecker::visit(EventDefinition const& _eventDef)
)
m_errorReporter.typeError(
var->location(),
"This type is only supported in the new experimental ABI encoder. "
"This type is only supported in ABIEncoderV2. "
"Use \"pragma experimental ABIEncoderV2;\" to enable the feature."
);
}

View File

@ -3,5 +3,5 @@ contract Test {
function g(uint[][1] calldata) external { }
}
// ----
// TypeError: (31-48): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (78-96): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (31-48): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (78-96): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -2,4 +2,4 @@ contract c {
event E(uint[][]);
}
// ----
// TypeError: (25-33): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (25-33): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -3,4 +3,4 @@ contract c {
event E(S);
}
// ----
// TypeError: (61-62): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (61-62): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -3,4 +3,4 @@ contract c {
event E(S);
}
// ----
// TypeError: (51-52): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (51-52): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -3,4 +3,4 @@ contract c {
event E(S indexed);
}
// ----
// TypeError: (51-60): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (51-60): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -8,4 +8,4 @@ contract C {
mapping(uint256 => X) public m;
}
// ----
// TypeError: (88-118): The following types are only supported for getters in the new experimental ABI encoder: struct C.Y memory. Either remove "public" or use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (88-118): The following types are only supported for getters in ABIEncoderV2: struct C.Y memory. Either remove "public" or use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -16,4 +16,4 @@ contract B is A { }
import "./B.sol";
contract C is B { }
// ----
// TypeError: (C.sol:18-37): Contract "C" does not use the new experimental ABI encoder but wants to inherit from a contract which uses types that require it. Use "pragma experimental ABIEncoderV2;" for the inheriting contract as well to enable the feature.
// TypeError: (C.sol:18-37): Contract "C" does not use ABIEncoderV2 but wants to inherit from a contract which uses types that require it. Use "pragma experimental ABIEncoderV2;" for the inheriting contract as well to enable the feature.

View File

@ -14,4 +14,4 @@ contract B is A { }
import "./B.sol";
contract C is B { }
// ----
// TypeError: (B.sol:18-37): Contract "B" does not use the new experimental ABI encoder but wants to inherit from a contract which uses types that require it. Use "pragma experimental ABIEncoderV2;" for the inheriting contract as well to enable the feature.
// TypeError: (B.sol:18-37): Contract "B" does not use ABIEncoderV2 but wants to inherit from a contract which uses types that require it. Use "pragma experimental ABIEncoderV2;" for the inheriting contract as well to enable the feature.

View File

@ -2,4 +2,4 @@ contract C {
function f() public pure returns (string[][] memory) {}
}
// ----
// TypeError: (51-68): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (51-68): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -2,4 +2,4 @@ contract C {
function f() public pure returns (uint[][2] memory) {}
}
// ----
// TypeError: (51-67): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (51-67): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.

View File

@ -3,4 +3,4 @@ contract C {
function f() public pure returns (S memory x) {}
}
// ----
// TypeError: (80-90): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
// TypeError: (80-90): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.