@@ -2,17 +2,121 @@ This following summarizes the most important changes in recent Spicy releases.
22For an exhaustive list of all changes, see the :repo: `CHANGES ` file coming with
33the distribution.
44
5- Version 1.13 (in progress)
6- ==========================
5+ Version 1.13
6+ ============
77
88.. rubric :: New Functionality
99
10+ - GH-1788: We now support decoding and encoding to UTF16, in particular the new
11+ ``UTF16LE `` and ``UTF16BE `` charsets for little and big endian encoding,
12+ respectively.
13+
14+ - GH-1961: We now support creating type values in Spicy code. The primary use
15+ case for this is to pass type information to host applications, and debugging.
16+
17+ A type value is typically created from either ``typeinfo(TYPE) `` or
18+ ``typinfo(value) ``, or coercion from an existing ID of a custom type like
19+ ``global T: type = MyStruct); ``. The resulting value can be printed or stored
20+ in a variable of type ``type ``, e.g., ``global bool_t: type = typeinfo(bool); ``.
21+
22+ - GH-1971: Extend unit ``switch `` based on look-ahead to support blocks of items.
23+
24+ In 1.12.0 we added support grouping related unit fields in blocks; there the
25+ primary use case were ``if `` blocks to group fields with identical
26+ dependencies. We now also support such blocks inside unit ``switch `` constructs
27+ with lookahead so one can write the following code:
28+
29+ .. code-block :: spicy
30+
31+ # Parses either `a` followed by another `a`, or `b`.
32+ type X = unit {
33+ switch {
34+ -> {
35+ : b"a";
36+ : b"a";
37+ }
38+ -> : b"b";
39+ };
40+ };
41+
42+ - GH-1538: Implement compound statements (``{...} ``). This allows introducing
43+ local scopes, e.g., to group related code.
44+
45+ - GH-1946: ``string ``'s ``encode `` method gained an optional ``errors `` argument to
46+ influence error handling. The parameter defaults to
47+ ``DecodeErrorStrategy::REPLACE `` reproducing the previous implicit behavior.
48+
49+ - GH-2010: ``bytes `` and ``string `` gained ``ends_with `` methods
50+
51+ - GH-1965: Add support for case-insensitive matching to regular expressions.
52+
53+ By adding an ``i `` flag to a regular expression pattern, it will now be
54+ matched case-insensitively (e.g. ``/foobar/i ``).
55+
56+ - GH-1962: Add ``spicy-dump `` option to enable profiling.
57+
1058.. rubric :: Changed Functionality
1159
60+ - GH-1981, GH-1982, GH-1991: We now catch more user errors in defining function
61+ overloads. Previously these would likely (hopefully) have failed in C++ compilation
62+ down the line, but are now cleanly rejected.
63+
64+ - GH-1977: We now reject function overloads which only differ in their return type.
65+
66+ - GH-1991: We now reject function prototypes without ``&cxxname ``.
67+
68+ Since in Spicy global declarations can be in any order there is no need to
69+ introduce a function with a prototype if it is declared later. The only valid
70+ use case for function prototypes was if the function was implemented in C++
71+ and bound to the Spicy name with ``&cxxname ``.
72+
73+ - We have cleaned up our implementation for runtime type information, primarily
74+ intended for custom host applications.
75+
76+ - ``type_info::Value `` instances obtained through runtime type introspection
77+ can now be rendered to a user-facing representation with a new ``to_string ``
78+ method.
79+
80+ - The runtime representation was changed to correctly encode that tuple
81+ elements can remain unset. A Spicy-side tuple ``tuple<T1, T2, T3> `` now gets
82+ turned into ``std::tuple<std::optional<T1>, std::optional<T2>, std::optional<T3>> ``
83+ which captures the full semantics.
84+
85+ - We added type information for types previously not exposed, namely ``Null ``,
86+ ``Nothing `` and ``List ``. We also fixed the exposed type information for
87+ ``result<void> ``.
88+
89+ - GH-2011: We have optimized allocations for unit fields extracting vectors
90+ which should speed up extracting especially small and medium-size vectors.
91+ - GH-2035: We have dropped support for Ubuntu 20.04 (Focal Fossa) since it has
92+ reached end of standard support upstream.
93+ - GH-2026: Speed up matching of character classes in regexps
94+
1295.. rubric :: Bug fixes
1396
97+ - GH-1580: Catch when functions aren't called.
98+ - GH-1961: Fix generated C++ prototype header.
99+ - GH-1966: Reject anonymous units in variables and fields.
100+ - GH-1967: Fix inactive stack size check during module initialization.
101+ - GH-1968: Fix coercion of function call arguments.
102+ - GH-1976: Fix unit ``&max-size `` not returning to proper loc.
103+ - GH-2007: Fix using ``&try `` with ``&max-size ``, and potentially other cases.
104+ - GH-2016: Fix ``&size `` expressions evaluating multiple times.
105+ - GH-2038: Prevent escape of non-HILTI exception in lower-level driver functions.
106+ - GH-2047: Make sure ``bytes::to[U]Int `` returns runtime integers.
107+ - GH-2049: Add ``#include <cstdint> `` for fixed-width integers
108+
14109.. rubric :: Documentation
15110
111+ - GH-1155: Document iteration over maps/set/vectors.
112+ - GH-1963: Document ``assert-exception ``.
113+ - GH-1964: Document use of ``$$ `` inside ``&{while,until,until-including} ``.
114+ - GH-1973: Remove documentation of unsupported ``&nosub ``.
115+ - GH-1974: Add documentation on how to interpret stack traces involving fibers.
116+ - GH-1975: Fix possibly-incorrect custom host compile command
117+ - GH-2039: Touchup docs style section.
118+ - GH-1970, GH-2003: Fix minor typos in documentation.
119+
16120Version 1.12
17121============
18122
@@ -846,7 +950,7 @@ Version 1.6
846950 also consider their constness. This breaks e.g., cases where the used
847951 expression is not a LHS like the field the ``&default `` is defined for,
848952
849- .. code-block :: ruby
953+ .. code-block :: spicy
850954
851955 type X = unit {
852956 var x: bytes = b"" + a;
0 commit comments