Skip to content

Commit

Permalink
Merge pull request ethereum#2947 from ethereum/develop
Browse files Browse the repository at this point in the history
Merge develop into release for 0.4.17.
  • Loading branch information
chriseth authored Sep 21, 2017
2 parents d7661dd + a14fc5f commit bdeb9e5
Show file tree
Hide file tree
Showing 146 changed files with 4,725 additions and 2,211 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ cache:
ccache: true
directories:
- boost_1_57_0
- build
- $HOME/.local

install:
Expand Down Expand Up @@ -221,7 +220,7 @@ deploy:
branch:
- develop
- release
- /^v[0-9]/
- /^v\d/
# This is the deploy target for the native build (Linux and macOS)
# which generates ZIPs per commit and the source tarball.
#
Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ include(EthPolicy)
eth_policy()

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

option(SOLC_LINK_STATIC "Link solc executable statically on supported platforms" OFF)

# Setup cccache.
include(EthCcache)

# Let's find our dependencies
include(EthDependencies)
include(deps/jsoncpp.cmake)
include(jsoncpp)

find_package(Threads)

Expand Down
25 changes: 25 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
### 0.4.17 (2017-09-21)

Features:
* Assembly Parser: Support multiple assignment (``x, y := f()``).
* Code Generator: Keep a single copy of encoding functions when using the experimental "ABIEncoderV2".
* Code Generator: Partial support for passing ``structs`` as arguments and return parameters (requires ``pragma experimental ABIEncoderV2;`` for now).
* General: Support ``pragma experimental "v0.5.0";`` to activate upcoming breaking changes.
* General: Added ``.selector`` member on external function types to retrieve their signature.
* Optimizer: Add new optimization step to remove unused ``JUMPDEST``s.
* Static Analyzer: Warn when using deprecated builtins ``sha3`` and ``suicide``
(replaced by ``keccak256`` and ``selfdestruct``, introduced in 0.4.2 and 0.2.0, respectively).
* Syntax Checker: Warn if no visibility is specified on contract functions.
* Type Checker: Display helpful warning for unused function arguments/return parameters.
* Type Checker: Do not show the same error multiple times for events.
* Type Checker: Greatly reduce the number of duplicate errors shown for duplicate constructors and functions.
* Type Checker: Warn on using literals as tight packing parameters in ``keccak256``, ``sha3``, ``sha256`` and ``ripemd160``.
* Type Checker: Enforce ``view`` and ``pure``.
* Type Checker: Enforce ``view`` / ``constant`` with error as experimental 0.5.0 feature.
* Type Checker: Enforce fallback functions to be ``external`` as experimental 0.5.0 feature.

Bugfixes:
* ABI JSON: Include all overloaded events.
* Parser: Crash fix related to parseTypeName.
* Type Checker: Allow constant byte arrays.

### 0.4.16 (2017-08-24)

Features:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The Solidity Contract-Oriented Programming Language
[![Join the chat at https://gitter.im/ethereum/solidity](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/solidity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/ethereum/solidity](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/solidity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/ethereum/solidity.svg?branch=develop)](https://travis-ci.org/ethereum/solidity)

## Useful links
To get started you can find an introduction to the language in the [Solidity documentation](https://solidity.readthedocs.org). In the documentation, you can find [code examples](https://solidity.readthedocs.io/en/latest/solidity-by-example.html) as well as [a reference](https://solidity.readthedocs.io/en/latest/solidity-in-depth.html) of the syntax and details on how to write smart contracts.
Expand Down
48 changes: 44 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,50 @@
version: 2
jobs:
build:
branches:
ignore:
- /.*/
docker:
- image: trzeci/emscripten:sdk-tag-1.37.18-64bit
- image: trzeci/emscripten:sdk-tag-1.37.21-64bit
steps:
- checkout
- run:
name: Install external tests deps
command: |
apt-get -qq update
apt-get -qy install netcat curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | NVM_DIR=/usr/local/nvm bash
- run:
name: Test external tests deps
command: |
export NVM_DIR="/usr/local/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm --version
nvm install 6
node --version
npm --version
- run:
name: Init submodules
command: |
git submodule update --init
- restore_cache:
name: Restore Boost build
key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }}
- run:
name: Bootstrap Boost
command: |
scripts/travis-emscripten/install_deps.sh
- run:
name: Build
command: |
scripts/travis-emscripten/build_emscripten.sh
- save_cache:
name: Save Boost build
key: *boost-cache-key
paths:
- boost_1_57_0
- run:
name: Test
command: |
. /usr/local/nvm/nvm.sh
scripts/test_emscripten.sh
- store_artifacts:
path: build/solc/soljson.js
destination: soljson.js
15 changes: 15 additions & 0 deletions cmake/EthCcache.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Setup ccache.
#
# The ccache is auto-enabled if the tool is found.
# To disable set -DCCACHE=OFF option.
if(NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
find_program(CCACHE ccache DOC "ccache tool path; set to OFF to disable")
if(CCACHE)
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
if(COMMAND cotire)
# Change ccache config to meet cotire requirements.
set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros)
endif()
message(STATUS "[ccache] Enabled: ${CCACHE}")
endif()
endif()
8 changes: 0 additions & 8 deletions cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
#
# These settings then end up spanning all POSIX platforms (Linux, OS X, BSD, etc)

# Use ccache if available
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
message("Using ccache")
endif(CCACHE_FOUND)

include(CheckCXXCompilerFlag)

check_cxx_compiler_flag(-fstack-protector-strong have_stack_protector_strong)
Expand Down
51 changes: 51 additions & 0 deletions cmake/jsoncpp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
include(ExternalProject)

if (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
set(JSONCPP_CMAKE_COMMAND emcmake cmake)
else()
set(JSONCPP_CMAKE_COMMAND ${CMAKE_COMMAND})
endif()

# Disable implicit fallthrough warning in jsoncpp for gcc >= 7 until the upstream handles it properly
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(JSONCCP_EXTRA_FLAGS -Wno-implicit-fallthrough)
else()
set(JSONCCP_EXTRA_FLAGS "")
endif()

set(prefix "${CMAKE_BINARY_DIR}/deps")
set(JSONCPP_LIBRARY "${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(JSONCPP_INCLUDE_DIR "${prefix}/include")

set(byproducts "")
if(CMAKE_VERSION VERSION_GREATER 3.1)
set(byproducts BUILD_BYPRODUCTS "${JSONCPP_LIBRARY}")
endif()

ExternalProject_Add(jsoncpp-project
PREFIX "${prefix}"
DOWNLOAD_DIR "${CMAKE_SOURCE_DIR}/deps/downloads"
DOWNLOAD_NAME jsoncpp-1.7.7.tar.gz
URL https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz
URL_HASH SHA256=087640ebcf7fbcfe8e2717a0b9528fff89c52fcf69fa2a18cc2b538008098f97
CMAKE_COMMAND ${JSONCPP_CMAKE_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# Build static lib but suitable to be included in a shared lib.
-DCMAKE_POSITION_INDEPENDENT_CODE=${BUILD_SHARED_LIBS}
-DJSONCPP_WITH_TESTS=OFF
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF
-DCMAKE_CXX_FLAGS=${JSONCCP_EXTRA_FLAGS}
# Overwrite build and install commands to force Release build on MSVC.
BUILD_COMMAND cmake --build <BINARY_DIR> --config Release
INSTALL_COMMAND cmake --build <BINARY_DIR> --config Release --target install
${byproducts}
)

# Create jsoncpp imported library
add_library(jsoncpp STATIC IMPORTED)
file(MAKE_DIRECTORY ${JSONCPP_INCLUDE_DIR}) # Must exist.
set_property(TARGET jsoncpp PROPERTY IMPORTED_LOCATION ${JSONCPP_LIBRARY})
set_property(TARGET jsoncpp PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JSONCPP_INCLUDE_DIR})
add_dependencies(jsoncpp jsoncpp-project)
1 change: 0 additions & 1 deletion deps
Submodule deps deleted from e5c831
Loading

0 comments on commit bdeb9e5

Please sign in to comment.