From ee3a83416511ce252469a2f0e738f310f7acee61 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 6 Dec 2019 19:04:29 +0100 Subject: [PATCH 1/2] Add backwards compatibility to the generated soljson.js for solc-js <0.5.14 Reverts part of edd80a9 --- scripts/travis-emscripten/build_emscripten.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh index 8011205db..c2c8760ef 100755 --- a/scripts/travis-emscripten/build_emscripten.sh +++ b/scripts/travis-emscripten/build_emscripten.sh @@ -94,6 +94,9 @@ make -j 4 cd .. mkdir -p upload +# Patch soljson.js to provide backwards-compatibility with older emscripten versions +# TODO: remove in 0.6.0! +echo -n ";/* backwards compatibility */ Module['Runtime'] = Module; Module['Pointer_stringify'] = Module['UTF8ToString'];" >> $BUILD_DIR/libsolc/soljson.js cp $BUILD_DIR/libsolc/soljson.js upload/ cp $BUILD_DIR/libsolc/soljson.js ./ From b4a260d6e3ca4288593880cc2c4770303f92125d Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 6 Dec 2019 19:05:57 +0100 Subject: [PATCH 2/2] Test solc-js with v0.5.0 Reverts part of edd80a98 --- test/externalTests/common.sh | 4 ++-- test/solcjsTests.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/externalTests/common.sh b/test/externalTests/common.sh index e5a2dd3e7..dd9aa77aa 100644 --- a/test/externalTests/common.sh +++ b/test/externalTests/common.sh @@ -37,7 +37,7 @@ function setup_solcjs cd "$dir" printLog "Setting up solc-js..." - git clone --depth 1 -b master https://github.com/ethereum/solc-js.git solc + git clone --depth 1 -b v0.5.0 https://github.com/ethereum/solc-js.git solc cd solc npm install @@ -107,7 +107,7 @@ function force_solc_truffle_modules if [ -d "$d" ]; then cd $d rm -rf solc - git clone --depth 1 -b master https://github.com/ethereum/solc-js.git solc + git clone --depth 1 -b v0.5.0 https://github.com/ethereum/solc-js.git solc cp "$1" solc/soljson.js fi ) diff --git a/test/solcjsTests.sh b/test/solcjsTests.sh index df2554c21..d525a3f21 100755 --- a/test/solcjsTests.sh +++ b/test/solcjsTests.sh @@ -40,7 +40,7 @@ VERSION="$2" DIR=$(mktemp -d) ( echo "Preparing solc-js (master)..." - git clone --depth 1 --branch master https://github.com/ethereum/solc-js "$DIR" + git clone --depth 1 --branch v0.5.0 https://github.com/ethereum/solc-js "$DIR" cd "$DIR" # disable "prepublish" script which downloads the latest version # (we will replace it anyway and it is often incorrectly cached