mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
commit
00b5516eec
@ -131,6 +131,7 @@ commands:
|
||||
--silent \
|
||||
--fail \
|
||||
--show-error \
|
||||
--header "Authorization: Bearer ${GITHUB_ACCESS_TOKEN}" \
|
||||
"https://api.github.com/repos/${FOUNDRY_REPO}/git/refs/tags/${FOUNDRY_VERSION}" \
|
||||
| jq --raw-output .object.sha \
|
||||
)
|
||||
@ -570,6 +571,8 @@ defaults:
|
||||
# Parameterized Job Templates
|
||||
|
||||
# Separate compile-only runs of those external tests where a full run takes much longer.
|
||||
# Also see https://github.com/ethereum/solidity/pull/14234 for why we excluded those
|
||||
# external tests from the nightly jobs.
|
||||
- job_ems_compile_ext_colony: &job_ems_compile_ext_colony
|
||||
<<: *requires_b_ems
|
||||
name: t_ems_compile_ext_colony
|
||||
@ -684,15 +687,6 @@ defaults:
|
||||
binary_type: native
|
||||
image: cimg/node:18.11
|
||||
|
||||
- job_ems_test_ext_colony: &job_ems_test_ext_colony
|
||||
<<: *requires_b_ems
|
||||
name: t_ems_test_ext_colony
|
||||
project: colony
|
||||
binary_type: solcjs
|
||||
image: cimg/node:14.20
|
||||
resource_class: medium
|
||||
python2: true
|
||||
|
||||
- job_b_ubu_asan_clang: &job_b_ubu_asan_clang
|
||||
<<: *on_all_tags_and_branches
|
||||
name: b_ubu_asan_clang
|
||||
@ -1783,7 +1777,3 @@ workflows:
|
||||
- b_ubu_san_clang: *job_b_ubu_ubsan_clang
|
||||
- t_ubu_ubsan_clang_soltest: *requires_b_ubu_ubsan_clang
|
||||
- t_ubu_ubsan_clang_cli: *requires_b_ubu_ubsan_clang
|
||||
|
||||
# Emscripten build and tests that take more than 15 minutes to execute
|
||||
- b_ems: *requires_nothing
|
||||
- t_ext: *job_ems_test_ext_colony
|
||||
|
@ -248,6 +248,8 @@ ASTPointer<PragmaDirective> Parser::parsePragmaDirective(bool const _finishedPar
|
||||
|
||||
if (literals.size() >= 2 && literals[0] == "experimental" && literals[1] == "solidity")
|
||||
{
|
||||
if (m_evmVersion < EVMVersion::constantinople())
|
||||
fatalParserError(7637_error, "Experimental solidity requires Constantinople EVM version at the minimum.");
|
||||
if (_finishedParsingTopLevelPragmas)
|
||||
fatalParserError(8185_error, "Experimental pragma \"solidity\" can only be set at the beginning of the source unit.");
|
||||
m_experimentalSolidityEnabledInCurrentSourceUnit = true;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
shopt -s inherit_errexit
|
||||
|
||||
SCRIPT_DIR="$(dirname "$0")"
|
||||
|
||||
@ -28,6 +27,7 @@ function notify() {
|
||||
curl "https://${MATRIX_SERVER}/_matrix/client/v3/rooms/${MATRIX_NOTIFY_ROOM_ID}/send/m.room.message" \
|
||||
--request POST \
|
||||
--include \
|
||||
--fail \
|
||||
--header "Content-Type: application/json" \
|
||||
--header "Accept: application/json" \
|
||||
--header "Authorization: Bearer ${MATRIX_ACCESS_TOKEN}" \
|
||||
@ -63,10 +63,14 @@ function format_predefined_message() {
|
||||
|
||||
[[ -z "$template" ]] && fail "Message template for event [$event] not defined."
|
||||
|
||||
# Export variables that must be substituted
|
||||
export WORKFLOW_NAME JOB BRANCH TAG BUILD_URL BUILD_NUM
|
||||
envsubst < "$template"
|
||||
unset WORKFLOW_NAME JOB BRANCH TAG BUILD_URL BUILD_NUM
|
||||
# shellcheck disable=SC2016
|
||||
sed -e 's|${WORKFLOW_NAME}|'"${WORKFLOW_NAME}"'|' \
|
||||
-e 's|${JOB}|'"${JOB}"'|' \
|
||||
-e 's|${BRANCH}|'"${BRANCH}"'|' \
|
||||
-e 's|${TAG}|'"${TAG}"'|' \
|
||||
-e 's|${BUILD_URL}|'"${BUILD_URL}"'|' \
|
||||
-e 's|${BUILD_NUM}|'"${BUILD_NUM}"'|' \
|
||||
"$template"
|
||||
}
|
||||
|
||||
# Set message environment variables based on CI backend
|
||||
|
@ -110,7 +110,7 @@ do
|
||||
SOL_FILES+=("$line")
|
||||
done < <(
|
||||
grep --include "*.sol" -riL -E \
|
||||
"^\/\/ (Syntax|Type|Declaration)Error|^\/\/ ParserError (1684|2837|3716|3997|5333|6275|6281|6933|7319|8185)|^==== Source:" \
|
||||
"^\/\/ (Syntax|Type|Declaration)Error|^\/\/ ParserError (1684|2837|3716|3997|5333|6275|6281|6933|7319|8185|7637)|^==== Source:" \
|
||||
"${ROOT_DIR}/test/libsolidity/syntaxTests" \
|
||||
"${ROOT_DIR}/test/libsolidity/semanticTests" |
|
||||
# Skipping the unicode tests as I couldn't adapt the lexical grammar to recursively counting RLO/LRO/PDF's.
|
||||
|
@ -69,6 +69,14 @@ function gp2_test
|
||||
force_hardhat_unlimited_contract_size "$config_file" "$config_var"
|
||||
yarn
|
||||
|
||||
# Workaround for error caused by the last release of hardhat-waffle@2.0.6 that bumps ethereum-waffle
|
||||
# to version 4.0.10 and breaks gp2 build with the following error:
|
||||
#
|
||||
# Cannot find module 'ethereum-waffle/dist/cjs/src/deployContract'
|
||||
#
|
||||
# See: https://github.com/NomicFoundation/hardhat-waffle/commit/83ee9cb36ee59d0bedacbbd00043f030af104ad0
|
||||
yarn add '@nomiclabs/hardhat-waffle@2.0.5'
|
||||
|
||||
# Some dependencies come with pre-built artifacts. We want to build from scratch.
|
||||
rm -r node_modules/@gnosis.pm/safe-contracts/build/
|
||||
|
||||
|
@ -96,6 +96,14 @@ function prb_math_test
|
||||
yarn install --no-lock-file
|
||||
yarn add hardhat-gas-reporter
|
||||
|
||||
# Workaround for error caused by the last release of hardhat-waffle@2.0.6 that bumps ethereum-waffle
|
||||
# to version 4.0.10 and breaks prb-math build with the following error:
|
||||
#
|
||||
# Cannot find module 'ethereum-waffle/dist/cjs/src/deployContract'
|
||||
#
|
||||
# See: https://github.com/NomicFoundation/hardhat-waffle/commit/83ee9cb36ee59d0bedacbbd00043f030af104ad0
|
||||
yarn add '@nomiclabs/hardhat-waffle@2.0.5'
|
||||
|
||||
replace_version_pragmas
|
||||
|
||||
for preset in $SELECTED_PRESETS; do
|
||||
|
@ -17,5 +17,5 @@
|
||||
"src": "0:29:1"
|
||||
}
|
||||
],
|
||||
"src": "0:30:1"
|
||||
"src": "0:70:1"
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
pragma experimental solidity;
|
||||
|
||||
// ====
|
||||
// EVMVersion: >=constantinople
|
||||
// ----
|
||||
|
@ -16,5 +16,5 @@
|
||||
"src": "0:29:1"
|
||||
}
|
||||
],
|
||||
"src": "0:30:1"
|
||||
"src": "0:70:1"
|
||||
}
|
||||
|
@ -181,7 +181,8 @@ void ASTJSONTest::validateTestConfiguration() const
|
||||
}
|
||||
}
|
||||
|
||||
ASTJSONTest::ASTJSONTest(string const& _filename)
|
||||
ASTJSONTest::ASTJSONTest(string const& _filename):
|
||||
EVMVersionRestrictedTestCase(_filename)
|
||||
{
|
||||
if (!boost::algorithm::ends_with(_filename, ".sol"))
|
||||
BOOST_THROW_EXCEPTION(runtime_error("Invalid test contract file name: \"" + _filename + "\"."));
|
||||
|
@ -35,7 +35,7 @@ class CompilerStack;
|
||||
namespace solidity::frontend::test
|
||||
{
|
||||
|
||||
class ASTJSONTest: public TestCase
|
||||
class ASTJSONTest: public EVMVersionRestrictedTestCase
|
||||
{
|
||||
public:
|
||||
struct TestVariant
|
||||
|
@ -1,3 +1,5 @@
|
||||
pragma experimental solidity;
|
||||
// ====
|
||||
// EVMVersion: >=constantinople
|
||||
// ----
|
||||
// Warning 2264: (0-29): Experimental features are turned on. Do not use experimental features on live deployments.
|
||||
|
@ -18,6 +18,8 @@ import "A.sol";
|
||||
contract D {
|
||||
A a;
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: >=constantinople
|
||||
// ----
|
||||
// ParserError 2141: (B.sol:0-29): File declares "pragma experimental solidity". If you want to enable the experimental mode, all source units must include the pragma.
|
||||
// ParserError 2141: (C.sol:0-29): File declares "pragma experimental solidity". If you want to enable the experimental mode, all source units must include the pragma.
|
||||
|
@ -1,5 +1,7 @@
|
||||
contract A {}
|
||||
|
||||
pragma experimental solidity;
|
||||
// ====
|
||||
// EVMVersion: >=constantinople
|
||||
// ----
|
||||
// ParserError 8185: (45-45): Experimental pragma "solidity" can only be set at the beginning of the source unit.
|
||||
|
@ -9,5 +9,7 @@ struct A
|
||||
{
|
||||
uint256 x;
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: >=constantinople
|
||||
// ----
|
||||
// ParserError 8185: (83-89): Experimental pragma "solidity" can only be set at the beginning of the source unit.
|
||||
|
@ -0,0 +1,8 @@
|
||||
pragma experimental solidity;
|
||||
|
||||
contract C {}
|
||||
|
||||
// ====
|
||||
// EVMVersion: <constantinople
|
||||
// ----
|
||||
// ParserError 7637: (31-39): Experimental solidity requires Constantinople EVM version at the minimum.
|
Loading…
Reference in New Issue
Block a user