Skip to content

Commit

Permalink
Merge pull request #8042 from ethereum/develop
Browse files Browse the repository at this point in the history
Merge develop into release for 0.6.0
  • Loading branch information
chriseth authored Dec 17, 2019
2 parents 6a57276 + 44c5abf commit 26b7007
Show file tree
Hide file tree
Showing 1,121 changed files with 20,553 additions and 5,828 deletions.
13 changes: 9 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2.1
parameters:
docker-image-rev:
type: string
default: "3"
default: "4"

defaults:

Expand Down Expand Up @@ -593,19 +593,24 @@ jobs:

t_ems_solcjs:
docker:
- image: circleci/node:10
- image: ethereum/solidity-buildpack-deps:ubuntu1904
environment:
TERM: xterm
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- run:
name: Install test dependencies
command: |
apt-get update
apt-get install -qqy --no-install-recommends nodejs npm cvc4
- run:
name: Test solcjs
command: |
node --version
npm --version
test/solcjsTests.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
test/externalTests/solc-js/solc-js.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
t_ems_compile_ext_gnosis:
docker:
Expand Down Expand Up @@ -716,7 +721,7 @@ workflows:
# basic checks
- chk_spelling: *workflow_trigger_on_tags
- chk_coding_style: *workflow_trigger_on_tags
- chk_docs_examples: *workflow_trigger_on_tags
# DISABLED FOR 0.6.0 - chk_docs_examples: *workflow_trigger_on_tags
- chk_buglist: *workflow_trigger_on_tags
- chk_proofs: *workflow_trigger_on_tags

Expand Down
2 changes: 1 addition & 1 deletion .circleci/docker/Dockerfile.clang.ubuntu1904
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ RUN set -ex; \
# EVMONE
RUN set -ex; \
cd /usr/src; \
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
git clone --branch="v0.4.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
cd evmone; \
mkdir build; \
cd build; \
Expand Down
4 changes: 2 additions & 2 deletions .circleci/docker/Dockerfile.ubuntu1804
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ RUN set -ex; \
rm -rf /var/lib/libfuzzer

# EVMONE
ARG EVMONE_HASH="fa4f40daf7cf9ccbcca6c78345977e084ea2136a8eae661e4d19471be852b15b"
ARG EVMONE_HASH="e9f8df89c52d9c60c9a38dd00687b1ec9e9ae9650b400a87c4c0cf7468e35307"
ARG EVMONE_MAJOR="0"
ARG EVMONE_MINOR="3"
ARG EVMONE_MINOR="4"
ARG EVMONE_MICRO="0"
RUN set -ex; \
EVMONE_VERSION="$EVMONE_MAJOR.$EVMONE_MINOR.$EVMONE_MICRO"; \
Expand Down
2 changes: 1 addition & 1 deletion .circleci/docker/Dockerfile.ubuntu1904
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN set -ex; \
# EVMONE
RUN set -ex; \
cd /usr/src; \
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
git clone --branch="v0.4.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
cd evmone; \
mkdir build; \
cd build; \
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(EthPolicy)
eth_policy()

# project name and version should be set after cmake_policy CMP0048
set(PROJECT_VERSION "0.5.15")
set(PROJECT_VERSION "0.6.0")
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)

include(TestBigEndian)
Expand Down
52 changes: 48 additions & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,55 @@
### 0.6.0 (2019-12-17)

Breaking changes:
* ABI: Remove the deprecated ``constant`` and ``payable`` fields.
* ABI: The ``type`` field is now required and no longer specified to default to ``function``.
* AST: Inline assembly is exported as structured JSON instead of plain string.
* C API (``libsolc``): Introduce context parameter to both ``solidity_compile`` and the callback.
* C API (``libsolc``): The provided callback now takes two parameters, kind and data. The callback can then be used for multiple purposes, such has file imports and SMT queries.
* C API (``libsolc``): ``solidity_free`` was renamed to ``solidity_reset``. Functions ``solidity_alloc`` and ``solidity_free`` were added.
* C API (``libsolc``): ``solidity_compile`` now returns a string that must be explicitly freed via ``solidity_free()``
* Commandline Interface: Remove the text-based AST printer (``--ast``).
* Commandline Interface: Switch to the new error reporter by default. ``--old-reporter`` falls back to the deprecated old error reporter.
* Commandline Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata.
* General: Disallow explicit conversions from external function types to ``address`` and add a member called ``address`` to them as replacement.
* General: Enable Yul optimizer as part of standard optimization.
* General: New reserved keywords: ``override``, ``receive``, and ``virtual``.
* General: ``private`` cannot be used together with ``virtual``.
* General: Split unnamed fallback functions into two cases defined using ``fallback()`` and ``receive()``.
* Inheritance: State variable shadowing is now disallowed.
* Inline Assembly: Only strict inline assembly is allowed.
* Inline Assembly: Variable declarations cannot shadow declarations outside the assembly block.
* JSON AST: Replace ``superFunction`` attribute by ``baseFunctions``.
* Natspec JSON Interface: Properly support multiple ``@return`` statements in ``@dev`` documentation and enforce named return parameters to be mentioned documentation.
* Source mappings: Add "modifier depth" as a fifth field in the source mappings.
* Standard JSON Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata.
* Syntax: ``push(element)`` for dynamic storage arrays do not return the new length anymore.
* Syntax: Abstract contracts need to be marked explicitly as abstract by using the ``abstract`` keyword.
* Syntax: ``length`` member of arrays is now always read-only, even for storage arrays.
* Type Checker: Resulting type of exponentiation is equal to the type of the base. Also allow signed types for the base.

Language Features:
* Allow explicit conversions from ``address`` to ``address payable`` via ``payable(...)``.
* Allow global enums and structs.
* Allow public variables to override external functions.
* Allow underscores as delimiters in hex strings.
* Introduce syntax for array slices and implement them for dynamic calldata arrays.
* Introduce ``push()`` for dynamic storage arrays. It returns a reference to the newly allocated element, if applicable.
* Introduce ``virtual`` and ``override`` keywords.
* Modify ``push(element)`` for dynamic storage arrays such that it does not return the new length anymore.
* Yul: Introduce ``leave`` statement that exits the current function.
* JSON AST: Add the function selector of each externally-visible FunctonDefinition to the AST JSON export.

Compiler Features:
* Allow revert strings to be stripped from the binary using the ``--revert-strings`` option or the ``settings.debug.revertStrings`` setting.
* ABIEncoderV2: Do not warn about enabled ABIEncoderV2 anymore (the pragma is still needed, though).


### 0.5.15 (2019-12-17)

Bugfixes:
* Yul Optimizer: Fix incorrect redundant load optimization crossing user-defined functions that contain for-loops with memory / storage writes.


### 0.5.14 (2019-12-09)

Language Features:
Expand All @@ -13,7 +59,7 @@ Language Features:


Compiler Features:
* Commandline Interface: Allow translation from yul / strict assembly to EWasm using ``solc --yul --yul-dialect evm --machine eWasm``
* Commandline Interface: Allow translation from yul / strict assembly to EWasm using ``solc --yul --yul-dialect evm --machine ewasm``
* Set the default EVM version to "Istanbul".
* SMTChecker: Add support to constructors including constructor inheritance.
* Yul: When compiling via Yul, string literals from the Solidity code are kept as string literals if every character is safely printable.
Expand Down Expand Up @@ -48,7 +94,6 @@ Compiler Features:
* TypeChecker: List possible candidates when overload resolution fails.
* TypeChecker: Disallow variables of library types.


Bugfixes:
* Code Generator: Fixed a faulty assert that would wrongly trigger for array sizes exceeding unsigned integer.
* SMTChecker: Fix internal error when accessing indices of fixed bytes.
Expand All @@ -59,7 +104,6 @@ Bugfixes:
* Code Generator: Fix internal error when trying to convert ``super`` to a different type



### 0.5.12 (2019-10-01)

Language Features:
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,23 @@ that run on the Ethereum Virtual Machine. Smart contracts are programs that are
network where nobody has special authority over the execution, and thus they allow to implement tokens of value,
ownership, voting and other kinds of logics.

When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4).
When deploying contracts, you should use the latest released version of
Solidity. This is because breaking changes as well as new features and bug fixes are
introduced regularly. We currently use a 0.x version
number [to indicate this fast pace of change](https://semver.org/#spec-item-4).

## Build and Install

Instructions about how to build and install the Solidity compiler can be found in the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source).
Instructions about how to build and install the Solidity compiler can be
found in the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source).


## Example

A "Hello World" program in Solidity is of even less use than in other languages, but still:

```solidity
pragma solidity ^0.5.0;
pragma solidity ^0.6.0;
contract HelloWorld {
function helloWorld() external pure returns (string memory) {
Expand Down Expand Up @@ -60,7 +64,8 @@ Please follow the
[Developers Guide](https://solidity.readthedocs.io/en/latest/contributing.html)
if you want to help.

You can find our current feature and bug priorities for forthcoming releases [in the projects section](https://github.com/ethereum/solidity/projects).
You can find our current feature and bug priorities for forthcoming
releases [in the projects section](https://github.com/ethereum/solidity/projects).

## Maintainers
* [@axic](https://github.com/axic)
Expand Down
4 changes: 3 additions & 1 deletion cmake/EthCheckCXXCompilerFlag.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ include(CheckCXXCompilerFlag)
#
function(eth_add_cxx_compiler_flag_if_supported FLAG)
# Remove leading - or / from the flag name.
string(REGEX REPLACE "^-|/" "" name ${FLAG})
string(REGEX REPLACE "^[-/]" "" name ${FLAG})
# Deletes any ':' because it's invalid variable names.
string(REGEX REPLACE ":" "" name ${name})
check_cxx_compiler_flag(${FLAG} ${name})
if(${name})
add_compile_options(${FLAG})
Expand Down
5 changes: 3 additions & 2 deletions docs/050-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ commandline compiler for linking):

::

pragma solidity >=0.5.0 <0.7.0;
// This will not compile after 0.6.0
pragma solidity >=0.5.0 <0.5.99;

library OldLibrary {
function someFunction(uint8 a) public returns(bool);
Expand Down Expand Up @@ -437,7 +438,7 @@ New version:
function f(uint y) external {
x = y;
}
function() payable external {}
receive() payable external {}
}

contract New {
Expand Down
Loading

0 comments on commit 26b7007

Please sign in to comment.