From 22712fde2589b2574a9fdc36e3ad90a61fe9783c Mon Sep 17 00:00:00 2001 From: Christoph Burgdorf Date: Wed, 24 Mar 2021 11:03:51 +0100 Subject: [PATCH] Compile release notes --- docs/release_notes.md | 167 ++++++++++++++++++++++++++++++++++ newsfragments/179.internal.md | 1 - newsfragments/212.bugfix.md | 1 - newsfragments/222.bugfix.md | 1 - newsfragments/250.bugfix.md | 8 -- newsfragments/271.feature.md | 1 - newsfragments/276.feature.md | 28 ------ newsfragments/296.feature.md | 1 - newsfragments/298.feature.md | 25 ----- newsfragments/304.bugfix.md | 3 - newsfragments/308.feature.md | 1 - newsfragments/311.feature.md | 1 - newsfragments/312.feature.md | 1 - newsfragments/313.feature.md | 1 - newsfragments/315.internal.md | 1 - newsfragments/317.bugfix.md | 52 ----------- newsfragments/320.bugfix.md | 11 --- newsfragments/323.bugfix.md | 9 -- newsfragments/324.bugfix.md | 1 - newsfragments/327.internal.md | 1 - 20 files changed, 167 insertions(+), 148 deletions(-) delete mode 100644 newsfragments/179.internal.md delete mode 100644 newsfragments/212.bugfix.md delete mode 100644 newsfragments/222.bugfix.md delete mode 100644 newsfragments/250.bugfix.md delete mode 100644 newsfragments/271.feature.md delete mode 100644 newsfragments/276.feature.md delete mode 100644 newsfragments/296.feature.md delete mode 100644 newsfragments/298.feature.md delete mode 100644 newsfragments/304.bugfix.md delete mode 100644 newsfragments/308.feature.md delete mode 100644 newsfragments/311.feature.md delete mode 100644 newsfragments/312.feature.md delete mode 100644 newsfragments/313.feature.md delete mode 100644 newsfragments/315.internal.md delete mode 100644 newsfragments/317.bugfix.md delete mode 100644 newsfragments/320.bugfix.md delete mode 100644 newsfragments/323.bugfix.md delete mode 100644 newsfragments/324.bugfix.md delete mode 100644 newsfragments/327.internal.md diff --git a/docs/release_notes.md b/docs/release_notes.md index 9b906a3312..fe53760876 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -11,6 +11,173 @@ Fe is moving fast. Read up on all the latest improvements. **WARNING: All Fe releases are alpha releases and only meant to share the development progress with developers and enthusiasts. It is NOT yet ready for production usage.** [//]: # (towncrier release notes start) +## 0.3.0-alpha "Calamine" (2021-03-24) + + +### Features + + +- Add over/underflow checks for multiplications of all integers ([#271](https://github.com/ethereum/fe/issues/271)) +- Add full support for empty Tuples. ([#276](https://github.com/ethereum/fe/issues/276)) + + All functions in Fe implicitly return an empty Tuple if they have no other return value. + However, before this change one was not able to use the empty Tuple syntax `()` explicitly. + + With this change, all of these are treated equally: + + ``` + contract Foo: + + pub def explicit_return_a1(): + return + + pub def explicit_return_a2(): + return () + + pub def explicit_return_b1() ->(): + return + + pub def explicit_return_b2() ->(): + return () + + pub def implicit_a1(): + pass + + pub def implicit_a2() ->(): + pass + ``` + +- The JSON ABI builder now supports structs as both input and output. ([#296](https://github.com/ethereum/fe/issues/296)) +- Make subsequently defined contracts visible. + + Before this change: + + ``` + # can't see Bar + contract Foo: + ... + # can see Foo + contract Bar: + ... + ``` + + With this change the restriction is lifted and the following becomes possible. ([#298](https://github.com/ethereum/fe/issues/298)) + + ``` + contract Foo: + bar: Bar + pub def external_bar() -> u256: + return self.bar.bar() + contract Bar: + foo: Foo + pub def external_foo() -> u256: + return self.foo.foo() + ``` + +- Perform checks for divison operations on integers ([#308](https://github.com/ethereum/fe/issues/308)) +- Support for msg.sig to read the function identifier. ([#311](https://github.com/ethereum/fe/issues/311)) +- Perform checks for modulo operations on integers ([#312](https://github.com/ethereum/fe/issues/312)) +- Perform over/underflow checks for exponentiation operations on integers ([#313](https://github.com/ethereum/fe/issues/313)) + + +### Bugfixes + + +- Properly reject `emit` not followed by an event invocation ([#212](https://github.com/ethereum/fe/issues/212)) +- Properly reject octal number literals ([#222](https://github.com/ethereum/fe/issues/222)) +- Properly reject code that tries to emit a non-existing event. ([#250](https://github.com/ethereum/fe/issues/250)) + + Example that now produces a compile time error: + + ``` + emit DoesNotExist() + ``` +- Contracts that create other contracts can now include `__init__` functions. + + See https://github.com/ethereum/fe/issues/284 ([#304](https://github.com/ethereum/fe/issues/304)) +- Prevent multiple types with same name in one module. ([#317](https://github.com/ethereum/fe/issues/317)) + + Examples that now produce compile time errors: + + ``` + type bar = u8 + type bar = u16 + ``` + + or + + ``` + struct SomeStruct: + some_field: u8 + + struct SomeStruct: + other: u8 + ``` + + or + + ``` + contract SomeContract: + some_field: u8 + + contract SomeContract: + other: u8 + ``` + + + Prevent multiple fields with same name in one struct. + + Example that now produces a compile time error: + + ``` + struct SomeStruct: + some_field: u8 + some_field: u8 + ``` + + + Prevent variable definition in child scope when name already taken in parent scope. + + Example that now produces a compile time error: + + ``` + pub def bar(): + my_array: u256[3] + sum: u256 = 0 + for i in my_array: + sum: u256 = 0 + ``` +- The CLI was using the overwrite flag to enable Yul optimization. + + i.e. + + ``` + # Would both overwite output files and run the Yul optimizer. + $ fe my_contract.fe --overwrite + ``` + + + Using the overwrite flag now only overwrites and optimization is enabled with the optimize flag. ([#320](https://github.com/ethereum/fe/issues/320)) +- Ensure analyzer rejects code that uses return values for `__init__` functions. ([#323](https://github.com/ethereum/fe/issues/323)) + + An example that now produces a compile time error: + + ``` + contract C: + pub def __init__() -> i32: + return 0 + ``` +- Properly reject calling an undefined function on an external contract ([#324](https://github.com/ethereum/fe/issues/324)) + + +### Internal Changes - for Fe Contributors + + +- Added the Uniswap demo contracts to our testing fixtures and validated their behaviour. ([#179](https://github.com/ethereum/fe/issues/179)) +- IDs added to AST nodes. ([#315](https://github.com/ethereum/fe/issues/315)) +- Failures in the Yul generation phase now panic; any failure is a bug. ([#327](https://github.com/ethereum/fe/issues/327)) + + ## 0.2.0-alpha "Borax" (2021-02-27) diff --git a/newsfragments/179.internal.md b/newsfragments/179.internal.md deleted file mode 100644 index 0e87b0e2f2..0000000000 --- a/newsfragments/179.internal.md +++ /dev/null @@ -1 +0,0 @@ -Added the Uniswap demo contracts to our testing fixtures and validated their behaviour. \ No newline at end of file diff --git a/newsfragments/212.bugfix.md b/newsfragments/212.bugfix.md deleted file mode 100644 index d0f6193c90..0000000000 --- a/newsfragments/212.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Properly reject `emit` not followed by an event invocation \ No newline at end of file diff --git a/newsfragments/222.bugfix.md b/newsfragments/222.bugfix.md deleted file mode 100644 index f605059b1a..0000000000 --- a/newsfragments/222.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Properly reject octal number literals diff --git a/newsfragments/250.bugfix.md b/newsfragments/250.bugfix.md deleted file mode 100644 index 8b8d41e522..0000000000 --- a/newsfragments/250.bugfix.md +++ /dev/null @@ -1,8 +0,0 @@ -Properly reject code that tries to emit a non-existing event. - -Example that now produces a compile time error: - -``` -emit DoesNotExist() -``` - diff --git a/newsfragments/271.feature.md b/newsfragments/271.feature.md deleted file mode 100644 index 076b515c8b..0000000000 --- a/newsfragments/271.feature.md +++ /dev/null @@ -1 +0,0 @@ -Add over/underflow checks for multiplications of all integers diff --git a/newsfragments/276.feature.md b/newsfragments/276.feature.md deleted file mode 100644 index 9e3783ba5d..0000000000 --- a/newsfragments/276.feature.md +++ /dev/null @@ -1,28 +0,0 @@ -Add full support for empty Tuples. - -All functions in Fe implicitly return an empty Tuple if they have no other return value. -However, before this change one was not able to use the empty Tuple syntax `()` explicitly. - -With this change, all of these are treated equally: - -``` -contract Foo: - - pub def explicit_return_a1(): - return - - pub def explicit_return_a2(): - return () - - pub def explicit_return_b1() ->(): - return - - pub def explicit_return_b2() ->(): - return () - - pub def implicit_a1(): - pass - - pub def implicit_a2() ->(): - pass -``` \ No newline at end of file diff --git a/newsfragments/296.feature.md b/newsfragments/296.feature.md deleted file mode 100644 index 71cb2b682b..0000000000 --- a/newsfragments/296.feature.md +++ /dev/null @@ -1 +0,0 @@ -The JSON ABI builder now supports structs as both input and output. \ No newline at end of file diff --git a/newsfragments/298.feature.md b/newsfragments/298.feature.md deleted file mode 100644 index c826ca5ad3..0000000000 --- a/newsfragments/298.feature.md +++ /dev/null @@ -1,25 +0,0 @@ -Make subsequently defined contracts visible. - -Before this change: - -``` -# can't see Bar -contract Foo: - ... -# can see Foo -contract Bar: - ... -``` - -With this change the restriction is lifted and the following becomes possible. - -``` -contract Foo: - bar: Bar - pub def external_bar() -> u256: - return self.bar.bar() -contract Bar: - foo: Foo - pub def external_foo() -> u256: - return self.foo.foo() -``` diff --git a/newsfragments/304.bugfix.md b/newsfragments/304.bugfix.md deleted file mode 100644 index 5d7f687351..0000000000 --- a/newsfragments/304.bugfix.md +++ /dev/null @@ -1,3 +0,0 @@ -Contracts that create other contracts can now include `__init__` functions. - -See https://github.com/ethereum/fe/issues/284 \ No newline at end of file diff --git a/newsfragments/308.feature.md b/newsfragments/308.feature.md deleted file mode 100644 index 79265c39c3..0000000000 --- a/newsfragments/308.feature.md +++ /dev/null @@ -1 +0,0 @@ -Perform checks for divison operations on integers \ No newline at end of file diff --git a/newsfragments/311.feature.md b/newsfragments/311.feature.md deleted file mode 100644 index 6398af2751..0000000000 --- a/newsfragments/311.feature.md +++ /dev/null @@ -1 +0,0 @@ -Support for msg.sig to read the function identifier. \ No newline at end of file diff --git a/newsfragments/312.feature.md b/newsfragments/312.feature.md deleted file mode 100644 index a2b0be59e5..0000000000 --- a/newsfragments/312.feature.md +++ /dev/null @@ -1 +0,0 @@ -Perform checks for modulo operations on integers \ No newline at end of file diff --git a/newsfragments/313.feature.md b/newsfragments/313.feature.md deleted file mode 100644 index b62902cf0c..0000000000 --- a/newsfragments/313.feature.md +++ /dev/null @@ -1 +0,0 @@ -Perform over/underflow checks for exponentiation operations on integers \ No newline at end of file diff --git a/newsfragments/315.internal.md b/newsfragments/315.internal.md deleted file mode 100644 index 9a80663499..0000000000 --- a/newsfragments/315.internal.md +++ /dev/null @@ -1 +0,0 @@ -IDs added to AST nodes. \ No newline at end of file diff --git a/newsfragments/317.bugfix.md b/newsfragments/317.bugfix.md deleted file mode 100644 index 49d5294cc9..0000000000 --- a/newsfragments/317.bugfix.md +++ /dev/null @@ -1,52 +0,0 @@ -Prevent multiple types with same name in one module. - -Examples that now produce compile time errors: - -``` -type bar = u8 -type bar = u16 -``` - -or - -``` -struct SomeStruct: - some_field: u8 - -struct SomeStruct: - other: u8 -``` - -or - -``` -contract SomeContract: - some_field: u8 - -contract SomeContract: - other: u8 -``` - - -Prevent multiple fields with same name in one struct. - -Example that now produces a compile time error: - -``` -struct SomeStruct: - some_field: u8 - some_field: u8 -``` - - -Prevent variable definition in child scope when name already taken in parent scope. - -Example that now produces a compile time error: - -``` -pub def bar(): - my_array: u256[3] - sum: u256 = 0 - for i in my_array: - sum: u256 = 0 -``` diff --git a/newsfragments/320.bugfix.md b/newsfragments/320.bugfix.md deleted file mode 100644 index ec49f00bce..0000000000 --- a/newsfragments/320.bugfix.md +++ /dev/null @@ -1,11 +0,0 @@ -The CLI was using the overwrite flag to enable Yul optimization. - -i.e. - -``` -# Would both overwite output files and run the Yul optimizer. -$ fe my_contract.fe --overwrite -``` - - -Using the overwrite flag now only overwrites and optimization is enabled with the optimize flag. \ No newline at end of file diff --git a/newsfragments/323.bugfix.md b/newsfragments/323.bugfix.md deleted file mode 100644 index e142387040..0000000000 --- a/newsfragments/323.bugfix.md +++ /dev/null @@ -1,9 +0,0 @@ -Ensure analyzer rejects code that uses return values for `__init__` functions. - -An example that now produces a compile time error: - -``` -contract C: - pub def __init__() -> i32: - return 0 -``` diff --git a/newsfragments/324.bugfix.md b/newsfragments/324.bugfix.md deleted file mode 100644 index dcb70e01fa..0000000000 --- a/newsfragments/324.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Properly reject calling an undefined function on an external contract \ No newline at end of file diff --git a/newsfragments/327.internal.md b/newsfragments/327.internal.md deleted file mode 100644 index b6a21f720b..0000000000 --- a/newsfragments/327.internal.md +++ /dev/null @@ -1 +0,0 @@ -Failures in the Yul generation phase now panic; any failure is a bug.