Skip to content

Commit

Permalink
Merge pull request #1782 from ethereum/develop
Browse files Browse the repository at this point in the history
Solidity 0.4.10
  • Loading branch information
chriseth committed Mar 15, 2017
2 parents 364da42 + 5909990 commit f0d539a
Show file tree
Hide file tree
Showing 122 changed files with 3,601 additions and 1,484 deletions.
117 changes: 68 additions & 49 deletions .travis.yml
Expand Up @@ -21,10 +21,11 @@
# You should have received a copy of the GNU General Public License
# along with solidity. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2016 solidity contributors.
# (c) 2016-2017 solidity contributors.
#------------------------------------------------------------------------------

language: cpp

branches:
# We need to whitelist the branches which we want to have "push" automation,
# this includes tags (which are treated as branches by travis).
Expand All @@ -33,6 +34,18 @@ branches:
- develop
- release
- /^v[0-9]/

env:
global:
- ENCRYPTION_LABEL="6d4541b72666"
- SOLC_BUILD_TYPE=RelWithDebInfo
- SOLC_DOCS=Off
- SOLC_EMSCRIPTEN=Off
- SOLC_INSTALL_DEPS_TRAVIS=On
- SOLC_RELEASE=On
- SOLC_TESTS=On
- SOLC_DOCKER=Off

matrix:
include:
# Ubuntu 14.04 LTS "Trusty Tahr"
Expand Down Expand Up @@ -61,10 +74,24 @@ matrix:
dist: trusty
sudo: required
compiler: gcc
before_install:
- sudo apt-get -y install python-sphinx
env:
- TRAVIS_DOCS=On
- TRAVIS_RELEASE=Off
- TRAVIS_TESTS=Off
- SOLC_DOCS=On
- SOLC_RELEASE=Off
- SOLC_TESTS=Off

# Docker target, which generates a statically linked alpine image
- os: linux
dist: trusty
sudo: required
services:
- docker
env:
- SOLC_DOCKER=On
- SOLC_INSTALL_DEPS_TRAVIS=Off
- SOLC_RELEASE=Off
- SOLC_TESTS=Off

# Emscripten target, which compiles 'solc' to javascript and uploads the resulting .js
# files to https://github.com/ethereum/solc-bin. These binaries are used in Browser-Solidity
Expand All @@ -73,16 +100,19 @@ matrix:
dist: trusty
sudo: required
compiler: gcc
node_js: stable
node_js:
- "6"
services:
- docker
before_install:
- nvm install 6
- nvm use 6
- docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit
env:
- TRAVIS_EMSCRIPTEN=On
- TRAVIS_INSTALL_DEPS=Off
- TRAVIS_RELEASE=Off
- TRAVIS_TESTS=Off
- SOLC_EMSCRIPTEN=On
- SOLC_INSTALL_DEPS_TRAVIS=Off
- SOLC_RELEASE=Off
- SOLC_TESTS=Off

# OS X Mavericks (10.9)
# https://en.wikipedia.org/wiki/OS_X_Mavericks
Expand All @@ -101,7 +131,7 @@ matrix:
# env:
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
# # https://github.com/ethereum/solidity/issues/894
# - TRAVIS_TESTS=Off
# - SOLC_TESTS=Off
# - ZIP_SUFFIX=osx-yosemite

# OS X El Capitan (10.11)
Expand All @@ -112,10 +142,10 @@ matrix:
# env:
# # The use of Debug config here ONLY for El Capitan is a workaround for "The Heisenbug"
# # See https://github.com/ethereum/webthree-umbrella/issues/565
# - TRAVIS_BUILD_TYPE=Debug
# - SOLC_BUILD_TYPE=Debug
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
# # https://github.com/ethereum/solidity/issues/894
# - TRAVIS_TESTS=Off
# - SOLC_TESTS=Off
# - ZIP_SUFFIX=osx-elcapitan

# macOS Sierra (10.12)
Expand All @@ -126,10 +156,10 @@ matrix:
# env:
# # Look like "The Heisenbug" is occurring here too, so we'll do the same workaround.
# # See https://travis-ci.org/ethereum/solidity/jobs/150240930
# - TRAVIS_BUILD_TYPE=Debug
# - SOLC_BUILD_TYPE=Debug
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
# # https://github.com/ethereum/solidity/issues/894
# - TRAVIS_TESTS=Off
# - SOLC_TESTS=Off
# - ZIP_SUFFIX=macos-sierra

git:
Expand All @@ -143,41 +173,20 @@ cache:
- $HOME/.local

install:
- test $TRAVIS_INSTALL_DEPS != On || ./scripts/install_deps.sh
- test "$TRAVIS_OS_NAME" != "linux" || ./scripts/install_cmake.sh
- test $SOLC_INSTALL_DEPS_TRAVIS != On || (scripts/install_deps.sh)
- test "$TRAVIS_OS_NAME" != "linux" || (scripts/install_cmake.sh)
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt
- test $SOLC_DOCKER != On || (docker build -t ethereum/solc:build -f scripts/Dockerfile .)

before_script:
- test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh
- test $TRAVIS_RELEASE != On || (mkdir -p build
&& cd build
&& cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
&& make -j2
&& cd ..
&& ./scripts/release.sh $ZIP_SUFFIX
&& ./scripts/create_source_tarball.sh )
script:
- test $TRAVIS_DOCS != On || ./scripts/docs.sh
- test $SOLC_EMSCRIPTEN != On || (scripts/build_emscripten.sh)
- test $SOLC_RELEASE != On || (scripts/build.sh $SOLC_BUILD_TYPE
&& scripts/release.sh $ZIP_SUFFIX
&& scripts/create_source_tarball.sh)

# There are a variety of reliability issues with the Solidity unit-tests at the time of
# writing (especially on macOS), so within TravisCI we will try to run the unit-tests
# up to 3 times before giving up and declaring the tests as broken.
#
# We should aim to remove this "retry logic" as soon as we can, because it is a
# band-aid for issues which need solving at their root. Some of those issues will be
# in Solidity's RPC setup and some will be in 'eth'. It seems unlikely that Solidity
# itself is broken from the failure messages which we are seeing.
#
# More details on known issues at https://github.com/ethereum/solidity/issues/769
- test $TRAVIS_TESTS != On || (cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) )
env:
global:
- ENCRYPTION_LABEL="6d4541b72666"
- TRAVIS_BUILD_TYPE=RelWithDebInfo
- TRAVIS_DOCS=Off
- TRAVIS_EMSCRIPTEN=Off
- TRAVIS_INSTALL_DEPS=On
- TRAVIS_RELEASE=On
- TRAVIS_TESTS=On
script:
- test $SOLC_DOCS != On || (scripts/docs.sh)
- test $SOLC_TESTS != On || (cd $TRAVIS_BUILD_DIR && scripts/tests.sh)

deploy:
# This is the deploy target for the Emscripten build.
Expand All @@ -186,14 +195,24 @@ deploy:
# Both the build and deploy steps for Emscripten are only run within the Ubuntu
# configurations (not for macOS). That is controlled by conditionals within the bash
# scripts because TravisCI doesn't provide much in the way of conditional logic.

- provider: script
script: test $TRAVIS_EMSCRIPTEN != On || scripts/release_emscripten.sh
script: test $SOLC_EMSCRIPTEN != On || (scripts/release_emscripten.sh)
skip_cleanup: true
on:
branch:
- develop
- release
# This is the deploy target for the dockerfile. If we are pushing into a develop branch, it will be tagged
# as a nightly and appended the commit of the branch it was pushed in. If we are pushing to master it will
# be tagged as "stable" and given the version tag as well.
- provider: script
script: test $SOLC_DOCKER != On || (scripts/docker_deploy.sh)
skip_cleanup: true
on:
branch:
- develop
- release

# This is the deploy target for the native build (Linux and macOS)
# which generates ZIPs per commit and the source tarball.
#
Expand All @@ -211,4 +230,4 @@ deploy:
on:
all_branches: true
tags: true
condition: $TRAVIS_RELEASE == On
condition: $SOLC_RELEASE == On
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -8,7 +8,7 @@ include(EthPolicy)
eth_policy()

# project name and version should be set after cmake_policy CMP0048
set(PROJECT_VERSION "0.4.9")
set(PROJECT_VERSION "0.4.10")
project(solidity VERSION ${PROJECT_VERSION})

# Let's find our dependencies
Expand Down
31 changes: 31 additions & 0 deletions Changelog.md
@@ -1,3 +1,34 @@
### 0.4.10 (2017-03-15)

Features:
* Add ``assert(condition)``, which throws if condition is false (meant for internal errors).
* Add ``require(condition)``, which throws if condition is false (meant for invalid input).
* Commandline interface: Do not overwrite files unless forced.
* Introduce ``.transfer(value)`` for sending Ether.
* Code generator: Support ``revert()`` to abort with rolling back, but not consuming all gas.
* Inline assembly: Support ``revert`` (EIP140) as an opcode.
* Parser: Support scientific notation in numbers (e.g. ``2e8`` and ``200e-2``).
* Type system: Support explicit conversion of external function to address.
* Type system: Warn if base of exponentiation is literal (result type might be unexpected).
* Type system: Warn if constant state variables are not compile-time constants.

Bugfixes:
* Commandline interface: Always escape filenames (replace ``/``, ``:`` and ``.`` with ``_``).
* Commandline interface: Do not try creating paths ``.`` and ``..``.
* Commandline interface: Allow long library names.
* Parser: Disallow octal literals.
* Type system: Fix a crash caused by continuing on fatal errors in the code.
* Type system: Disallow compound assignment for tuples.
* Type system: Detect cyclic dependencies between constants.
* Type system: Disallow arrays with negative length.
* Type system: Fix a crash related to invalid binary operators.
* Type system: Disallow ``var`` declaration with empty tuple type.
* Type system: Correctly convert function argument types to pointers for member functions.
* Type system: Move privateness of constructor into AST itself.
* Inline assembly: Charge one stack slot for non-value types during analysis.
* Assembly output: Print source location before the operation it refers to instead of after.
* Optimizer: Stop trying to optimize tricky constants after a while.

### 0.4.9 (2017-01-31)

Features:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -62,7 +62,7 @@ test_script:
- ps: Start-Sleep -s 100
- cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
- copy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" .
- soltest.exe -- --ipcpath \\.\pipe\geth.ipc
- soltest.exe --show-progress -- --ipcpath \\.\pipe\geth.ipc

artifacts:
- path: solidity-windows.zip
Expand Down
2 changes: 1 addition & 1 deletion cmake/EthCompilerSettings.cmake
Expand Up @@ -71,7 +71,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
add_compile_options(-fPIC)

# Configuration-specific compiler settings.
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -DETH_DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DETH_DEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
Expand Down

0 comments on commit f0d539a

Please sign in to comment.