Posted on 2021-10-05

It's been a couple months since our last update. In this time, we've merged a total of 20 pull requests from 7 different contributors. Here are some highlights.

We shipped 2 more releases

As always, you can find the binaries and notes on the release pages.

self as a parameter

The self value is no longer implicitly defined in all code blocks. It must now be declared as the first parameter in a contract function signature.

This change was made as part of an effort to make function access more explicit. There is a similar change coming with #558.

Added in #520.

fn instead of def

Fe no longer uses the def keyword as a label for function definitions. We use fn instead now. This makes the syntax more clear.

Added in #496.

Query-based analysis

The analyzer was previously implemented as a single pass through the AST, which meant that it wasn't possible to refer to a type defined later in the file or define recursive types. To solve this problem and to improve the overall design of the analyzer, we now use Salsa, and thus a query-based style.

Salsa is used extensively in rust-analyzer, which is where we got the idea to use it.

Added in #468.

Other features and bugfixes

  • Typo fix in docs (thanks @jacobkaufmann!) #549
  • Fuzzer crash fixed #546
  • Readme improvements (thanks @zora89!) #544
  • Pretty printed display of AST #540
  • Analyzer checks for shadowing of built-ins and generic arg lists where they don't belong #539
  • Don't ignore non-fatal parser errors when analysis succeeds #535
  • Fix "analysis failed but no diagnostics were emitted" panics #534
  • Add support for numeric invert operator #526
  • Check labels in function calls on self and external contracts #518
  • Cover all remaining statements and expressions in the spec #514
  • Fuzzer crash fixed (thanks @andy-ow!) #510
  • let var decl (thanks @WilfredTA!) #509
  • Validate string literals to only allow a subset of ASCII chars #506
  • Reject certain code that should return but doesn't #502
  • Overhaul spec content #489

What's next

We are still focused on cutting a beta release before the end of the year and will keep the community updated. For more information about our immediate goals and to see whats under development, please see the issues and PRs in our repository.


Stay tuned for more updates and monthly releases.