Skip to content

Commit f0d539a

Browse files
authored
Merge pull request #1782 from ethereum/develop
Solidity 0.4.10
2 parents 364da42 + 5909990 commit f0d539a

File tree

122 files changed

+3601
-1484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3601
-1484
lines changed

.travis.yml

Lines changed: 68 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
# You should have received a copy of the GNU General Public License
2222
# along with solidity. If not, see <http://www.gnu.org/licenses/>
2323
#
24-
# (c) 2016 solidity contributors.
24+
# (c) 2016-2017 solidity contributors.
2525
#------------------------------------------------------------------------------
2626

2727
language: cpp
28+
2829
branches:
2930
# We need to whitelist the branches which we want to have "push" automation,
3031
# this includes tags (which are treated as branches by travis).
@@ -33,6 +34,18 @@ branches:
3334
- develop
3435
- release
3536
- /^v[0-9]/
37+
38+
env:
39+
global:
40+
- ENCRYPTION_LABEL="6d4541b72666"
41+
- SOLC_BUILD_TYPE=RelWithDebInfo
42+
- SOLC_DOCS=Off
43+
- SOLC_EMSCRIPTEN=Off
44+
- SOLC_INSTALL_DEPS_TRAVIS=On
45+
- SOLC_RELEASE=On
46+
- SOLC_TESTS=On
47+
- SOLC_DOCKER=Off
48+
3649
matrix:
3750
include:
3851
# Ubuntu 14.04 LTS "Trusty Tahr"
@@ -61,10 +74,24 @@ matrix:
6174
dist: trusty
6275
sudo: required
6376
compiler: gcc
77+
before_install:
78+
- sudo apt-get -y install python-sphinx
6479
env:
65-
- TRAVIS_DOCS=On
66-
- TRAVIS_RELEASE=Off
67-
- TRAVIS_TESTS=Off
80+
- SOLC_DOCS=On
81+
- SOLC_RELEASE=Off
82+
- SOLC_TESTS=Off
83+
84+
# Docker target, which generates a statically linked alpine image
85+
- os: linux
86+
dist: trusty
87+
sudo: required
88+
services:
89+
- docker
90+
env:
91+
- SOLC_DOCKER=On
92+
- SOLC_INSTALL_DEPS_TRAVIS=Off
93+
- SOLC_RELEASE=Off
94+
- SOLC_TESTS=Off
6895

6996
# Emscripten target, which compiles 'solc' to javascript and uploads the resulting .js
7097
# files to https://github.com/ethereum/solc-bin. These binaries are used in Browser-Solidity
@@ -73,16 +100,19 @@ matrix:
73100
dist: trusty
74101
sudo: required
75102
compiler: gcc
76-
node_js: stable
103+
node_js:
104+
- "6"
77105
services:
78106
- docker
79107
before_install:
108+
- nvm install 6
109+
- nvm use 6
80110
- docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit
81111
env:
82-
- TRAVIS_EMSCRIPTEN=On
83-
- TRAVIS_INSTALL_DEPS=Off
84-
- TRAVIS_RELEASE=Off
85-
- TRAVIS_TESTS=Off
112+
- SOLC_EMSCRIPTEN=On
113+
- SOLC_INSTALL_DEPS_TRAVIS=Off
114+
- SOLC_RELEASE=Off
115+
- SOLC_TESTS=Off
86116

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

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

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

135165
git:
@@ -143,41 +173,20 @@ cache:
143173
- $HOME/.local
144174

145175
install:
146-
- test $TRAVIS_INSTALL_DEPS != On || ./scripts/install_deps.sh
147-
- test "$TRAVIS_OS_NAME" != "linux" || ./scripts/install_cmake.sh
176+
- test $SOLC_INSTALL_DEPS_TRAVIS != On || (scripts/install_deps.sh)
177+
- test "$TRAVIS_OS_NAME" != "linux" || (scripts/install_cmake.sh)
148178
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt
179+
- test $SOLC_DOCKER != On || (docker build -t ethereum/solc:build -f scripts/Dockerfile .)
180+
149181
before_script:
150-
- test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh
151-
- test $TRAVIS_RELEASE != On || (mkdir -p build
152-
&& cd build
153-
&& cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
154-
&& make -j2
155-
&& cd ..
156-
&& ./scripts/release.sh $ZIP_SUFFIX
157-
&& ./scripts/create_source_tarball.sh )
158-
script:
159-
- test $TRAVIS_DOCS != On || ./scripts/docs.sh
182+
- test $SOLC_EMSCRIPTEN != On || (scripts/build_emscripten.sh)
183+
- test $SOLC_RELEASE != On || (scripts/build.sh $SOLC_BUILD_TYPE
184+
&& scripts/release.sh $ZIP_SUFFIX
185+
&& scripts/create_source_tarball.sh)
160186

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

182191
deploy:
183192
# This is the deploy target for the Emscripten build.
@@ -186,14 +195,24 @@ deploy:
186195
# Both the build and deploy steps for Emscripten are only run within the Ubuntu
187196
# configurations (not for macOS). That is controlled by conditionals within the bash
188197
# scripts because TravisCI doesn't provide much in the way of conditional logic.
198+
189199
- provider: script
190-
script: test $TRAVIS_EMSCRIPTEN != On || scripts/release_emscripten.sh
200+
script: test $SOLC_EMSCRIPTEN != On || (scripts/release_emscripten.sh)
201+
skip_cleanup: true
202+
on:
203+
branch:
204+
- develop
205+
- release
206+
# This is the deploy target for the dockerfile. If we are pushing into a develop branch, it will be tagged
207+
# as a nightly and appended the commit of the branch it was pushed in. If we are pushing to master it will
208+
# be tagged as "stable" and given the version tag as well.
209+
- provider: script
210+
script: test $SOLC_DOCKER != On || (scripts/docker_deploy.sh)
191211
skip_cleanup: true
192212
on:
193213
branch:
194214
- develop
195215
- release
196-
197216
# This is the deploy target for the native build (Linux and macOS)
198217
# which generates ZIPs per commit and the source tarball.
199218
#
@@ -211,4 +230,4 @@ deploy:
211230
on:
212231
all_branches: true
213232
tags: true
214-
condition: $TRAVIS_RELEASE == On
233+
condition: $SOLC_RELEASE == On

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include(EthPolicy)
88
eth_policy()
99

1010
# project name and version should be set after cmake_policy CMP0048
11-
set(PROJECT_VERSION "0.4.9")
11+
set(PROJECT_VERSION "0.4.10")
1212
project(solidity VERSION ${PROJECT_VERSION})
1313

1414
# Let's find our dependencies

Changelog.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
### 0.4.10 (2017-03-15)
2+
3+
Features:
4+
* Add ``assert(condition)``, which throws if condition is false (meant for internal errors).
5+
* Add ``require(condition)``, which throws if condition is false (meant for invalid input).
6+
* Commandline interface: Do not overwrite files unless forced.
7+
* Introduce ``.transfer(value)`` for sending Ether.
8+
* Code generator: Support ``revert()`` to abort with rolling back, but not consuming all gas.
9+
* Inline assembly: Support ``revert`` (EIP140) as an opcode.
10+
* Parser: Support scientific notation in numbers (e.g. ``2e8`` and ``200e-2``).
11+
* Type system: Support explicit conversion of external function to address.
12+
* Type system: Warn if base of exponentiation is literal (result type might be unexpected).
13+
* Type system: Warn if constant state variables are not compile-time constants.
14+
15+
Bugfixes:
16+
* Commandline interface: Always escape filenames (replace ``/``, ``:`` and ``.`` with ``_``).
17+
* Commandline interface: Do not try creating paths ``.`` and ``..``.
18+
* Commandline interface: Allow long library names.
19+
* Parser: Disallow octal literals.
20+
* Type system: Fix a crash caused by continuing on fatal errors in the code.
21+
* Type system: Disallow compound assignment for tuples.
22+
* Type system: Detect cyclic dependencies between constants.
23+
* Type system: Disallow arrays with negative length.
24+
* Type system: Fix a crash related to invalid binary operators.
25+
* Type system: Disallow ``var`` declaration with empty tuple type.
26+
* Type system: Correctly convert function argument types to pointers for member functions.
27+
* Type system: Move privateness of constructor into AST itself.
28+
* Inline assembly: Charge one stack slot for non-value types during analysis.
29+
* Assembly output: Print source location before the operation it refers to instead of after.
30+
* Optimizer: Stop trying to optimize tricky constants after a while.
31+
132
### 0.4.9 (2017-01-31)
233

334
Features:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ test_script:
6262
- ps: Start-Sleep -s 100
6363
- cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
6464
- copy "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" .
65-
- soltest.exe -- --ipcpath \\.\pipe\geth.ipc
65+
- soltest.exe --show-progress -- --ipcpath \\.\pipe\geth.ipc
6666

6767
artifacts:
6868
- path: solidity-windows.zip

cmake/EthCompilerSettings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
7171
add_compile_options(-fPIC)
7272

7373
# Configuration-specific compiler settings.
74-
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -DETH_DEBUG")
74+
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DETH_DEBUG")
7575
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
7676
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
7777
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")

0 commit comments

Comments
 (0)