Skip to content

Commit 26b7007

Browse files
authored
Merge pull request #8042 from ethereum/develop
Merge develop into release for 0.6.0
2 parents 6a57276 + 44c5abf commit 26b7007

File tree

1,121 files changed

+20553
-5828
lines changed

Some content is hidden

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

1,121 files changed

+20553
-5828
lines changed

.circleci/config.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2.1
99
parameters:
1010
docker-image-rev:
1111
type: string
12-
default: "3"
12+
default: "4"
1313

1414
defaults:
1515

@@ -593,19 +593,24 @@ jobs:
593593

594594
t_ems_solcjs:
595595
docker:
596-
- image: circleci/node:10
596+
- image: ethereum/solidity-buildpack-deps:ubuntu1904
597597
environment:
598598
TERM: xterm
599599
steps:
600600
- checkout
601601
- attach_workspace:
602602
at: /tmp/workspace
603+
- run:
604+
name: Install test dependencies
605+
command: |
606+
apt-get update
607+
apt-get install -qqy --no-install-recommends nodejs npm cvc4
603608
- run:
604609
name: Test solcjs
605610
command: |
606611
node --version
607612
npm --version
608-
test/solcjsTests.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
613+
test/externalTests/solc-js/solc-js.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
609614
610615
t_ems_compile_ext_gnosis:
611616
docker:
@@ -716,7 +721,7 @@ workflows:
716721
# basic checks
717722
- chk_spelling: *workflow_trigger_on_tags
718723
- chk_coding_style: *workflow_trigger_on_tags
719-
- chk_docs_examples: *workflow_trigger_on_tags
724+
# DISABLED FOR 0.6.0 - chk_docs_examples: *workflow_trigger_on_tags
720725
- chk_buglist: *workflow_trigger_on_tags
721726
- chk_proofs: *workflow_trigger_on_tags
722727

.circleci/docker/Dockerfile.clang.ubuntu1904

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ RUN set -ex; \
9292
# EVMONE
9393
RUN set -ex; \
9494
cd /usr/src; \
95-
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
95+
git clone --branch="v0.4.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
9696
cd evmone; \
9797
mkdir build; \
9898
cd build; \

.circleci/docker/Dockerfile.ubuntu1804

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ RUN set -ex; \
7575
rm -rf /var/lib/libfuzzer
7676

7777
# EVMONE
78-
ARG EVMONE_HASH="fa4f40daf7cf9ccbcca6c78345977e084ea2136a8eae661e4d19471be852b15b"
78+
ARG EVMONE_HASH="e9f8df89c52d9c60c9a38dd00687b1ec9e9ae9650b400a87c4c0cf7468e35307"
7979
ARG EVMONE_MAJOR="0"
80-
ARG EVMONE_MINOR="3"
80+
ARG EVMONE_MINOR="4"
8181
ARG EVMONE_MICRO="0"
8282
RUN set -ex; \
8383
EVMONE_VERSION="$EVMONE_MAJOR.$EVMONE_MINOR.$EVMONE_MICRO"; \

.circleci/docker/Dockerfile.ubuntu1904

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ RUN set -ex; \
7777
# EVMONE
7878
RUN set -ex; \
7979
cd /usr/src; \
80-
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
80+
git clone --branch="v0.4.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
8181
cd evmone; \
8282
mkdir build; \
8383
cd build; \

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include(EthPolicy)
1010
eth_policy()
1111

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

1616
include(TestBigEndian)

Changelog.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,55 @@
1+
### 0.6.0 (2019-12-17)
2+
3+
Breaking changes:
4+
* ABI: Remove the deprecated ``constant`` and ``payable`` fields.
5+
* ABI: The ``type`` field is now required and no longer specified to default to ``function``.
6+
* AST: Inline assembly is exported as structured JSON instead of plain string.
7+
* C API (``libsolc``): Introduce context parameter to both ``solidity_compile`` and the callback.
8+
* 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.
9+
* C API (``libsolc``): ``solidity_free`` was renamed to ``solidity_reset``. Functions ``solidity_alloc`` and ``solidity_free`` were added.
10+
* C API (``libsolc``): ``solidity_compile`` now returns a string that must be explicitly freed via ``solidity_free()``
11+
* Commandline Interface: Remove the text-based AST printer (``--ast``).
12+
* Commandline Interface: Switch to the new error reporter by default. ``--old-reporter`` falls back to the deprecated old error reporter.
13+
* Commandline Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata.
14+
* General: Disallow explicit conversions from external function types to ``address`` and add a member called ``address`` to them as replacement.
15+
* General: Enable Yul optimizer as part of standard optimization.
16+
* General: New reserved keywords: ``override``, ``receive``, and ``virtual``.
17+
* General: ``private`` cannot be used together with ``virtual``.
18+
* General: Split unnamed fallback functions into two cases defined using ``fallback()`` and ``receive()``.
19+
* Inheritance: State variable shadowing is now disallowed.
20+
* Inline Assembly: Only strict inline assembly is allowed.
21+
* Inline Assembly: Variable declarations cannot shadow declarations outside the assembly block.
22+
* JSON AST: Replace ``superFunction`` attribute by ``baseFunctions``.
23+
* Natspec JSON Interface: Properly support multiple ``@return`` statements in ``@dev`` documentation and enforce named return parameters to be mentioned documentation.
24+
* Source mappings: Add "modifier depth" as a fifth field in the source mappings.
25+
* Standard JSON Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata.
26+
* Syntax: ``push(element)`` for dynamic storage arrays do not return the new length anymore.
27+
* Syntax: Abstract contracts need to be marked explicitly as abstract by using the ``abstract`` keyword.
28+
* Syntax: ``length`` member of arrays is now always read-only, even for storage arrays.
29+
* Type Checker: Resulting type of exponentiation is equal to the type of the base. Also allow signed types for the base.
30+
31+
Language Features:
32+
* Allow explicit conversions from ``address`` to ``address payable`` via ``payable(...)``.
33+
* Allow global enums and structs.
34+
* Allow public variables to override external functions.
35+
* Allow underscores as delimiters in hex strings.
36+
* Introduce syntax for array slices and implement them for dynamic calldata arrays.
37+
* Introduce ``push()`` for dynamic storage arrays. It returns a reference to the newly allocated element, if applicable.
38+
* Introduce ``virtual`` and ``override`` keywords.
39+
* Modify ``push(element)`` for dynamic storage arrays such that it does not return the new length anymore.
40+
* Yul: Introduce ``leave`` statement that exits the current function.
41+
* JSON AST: Add the function selector of each externally-visible FunctonDefinition to the AST JSON export.
42+
43+
Compiler Features:
44+
* Allow revert strings to be stripped from the binary using the ``--revert-strings`` option or the ``settings.debug.revertStrings`` setting.
45+
* ABIEncoderV2: Do not warn about enabled ABIEncoderV2 anymore (the pragma is still needed, though).
46+
47+
148
### 0.5.15 (2019-12-17)
249

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

6-
753
### 0.5.14 (2019-12-09)
854

955
Language Features:
@@ -13,7 +59,7 @@ Language Features:
1359

1460

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

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

61106

62-
63107
### 0.5.12 (2019-10-01)
64108

65109
Language Features:

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ that run on the Ethereum Virtual Machine. Smart contracts are programs that are
2020
network where nobody has special authority over the execution, and thus they allow to implement tokens of value,
2121
ownership, voting and other kinds of logics.
2222

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

2528
## Build and Install
2629

27-
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).
30+
Instructions about how to build and install the Solidity compiler can be
31+
found in the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source).
2832

2933

3034
## Example
3135

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

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

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

6570
## Maintainers
6671
* [@axic](https://github.com/axic)

cmake/EthCheckCXXCompilerFlag.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ include(CheckCXXCompilerFlag)
1010
#
1111
function(eth_add_cxx_compiler_flag_if_supported FLAG)
1212
# Remove leading - or / from the flag name.
13-
string(REGEX REPLACE "^-|/" "" name ${FLAG})
13+
string(REGEX REPLACE "^[-/]" "" name ${FLAG})
14+
# Deletes any ':' because it's invalid variable names.
15+
string(REGEX REPLACE ":" "" name ${name})
1416
check_cxx_compiler_flag(${FLAG} ${name})
1517
if(${name})
1618
add_compile_options(${FLAG})

docs/050-breaking-changes.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ commandline compiler for linking):
345345

346346
::
347347

348-
pragma solidity >=0.5.0 <0.7.0;
348+
// This will not compile after 0.6.0
349+
pragma solidity >=0.5.0 <0.5.99;
349350

350351
library OldLibrary {
351352
function someFunction(uint8 a) public returns(bool);
@@ -437,7 +438,7 @@ New version:
437438
function f(uint y) external {
438439
x = y;
439440
}
440-
function() payable external {}
441+
receive() payable external {}
441442
}
442443

443444
contract New {

0 commit comments

Comments
 (0)