Skip to content

Commit fc85feb

Browse files
committed
docs/changes: document deprecation of Record.
1 parent f28b20f commit fc85feb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/changes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This document describes changes to the public interfaces in the Amaranth languag
77
Version 0.4 (unreleased)
88
========================
99

10+
Support has been added for a new and improved way of defining data structures in :mod:`amaranth.lib.data` and component interfaces in :mod:`amaranth.lib.wiring`, as defined in `RFC 1`_ and `RFC 2`_. :class:`Record` has been deprecated. In a departure from the usual policy, to give designers additional time to migrate, :class:`Record` will be removed in Amaranth 0.6 (one release later than normal).
11+
1012
Support for enumerations has been extended. A shape for enumeration members can be provided for an enumeration class, as defined in `RFC 3`_.
1113

1214
The language includes several new extension points for integration with :class:`Value` based data structures defined outside of the core language. In particular, ``Signal(shape)`` may now return a :class:`Signal` object wrapped in another if ``shape`` implements the call protocol, as defined in `RFC 15`_.
@@ -28,6 +30,7 @@ Apply the following changes to code written against Amaranth 0.3 to migrate it t
2830
* Update imports of the form ``from amaranth.vendor.some_vendor import SomeVendorPlatform`` to ``from amaranth.vendor import SomeVendorPlatform``. This change will reduce future churn.
2931
* Replace uses of ``Const.normalize(value, shape)`` with ``Const(value, shape).value``.
3032
* Replace uses of ``Repl(value, count)`` with ``value.replicate(count)``.
33+
* Replace uses of ``Record`` with :mod:`amaranth.lib.data` and :mod:`amaranth.lib.wiring`. The appropriate replacement depends on the use case. If ``Record`` was being used for data storage and accessing the bit-level representation, use :mod:`amaranth.lib.data`. If ``Record`` was being used for connecting design components together, use :mod:`amaranth.lib.wiring`.
3134
* Remove uses of ``amaranth.lib.scheduler.RoundRobin`` by inlining or copying the implementation of that class.
3235

3336
While code that uses the features listed as deprecated below will work in Amaranth 0.4, they will be removed in the next version.
@@ -36,6 +39,7 @@ Implemented RFCs
3639
----------------
3740

3841
.. _RFC 1: https://amaranth-lang.org/rfcs/0001-aggregate-data-structures.html
42+
.. _RFC 2: https://amaranth-lang.org/rfcs/0002-interfaces.html
3943
.. _RFC 3: https://amaranth-lang.org/rfcs/0003-enumeration-shapes.html
4044
.. _RFC 4: https://amaranth-lang.org/rfcs/0004-const-castable-exprs.html
4145
.. _RFC 5: https://amaranth-lang.org/rfcs/0005-remove-const-normalize.html
@@ -48,7 +52,9 @@ Implemented RFCs
4852
.. _RFC 19: https://amaranth-lang.org/rfcs/0019-remove-scheduler.html
4953
.. _RFC 22: https://amaranth-lang.org/rfcs/0022-valuecastable-shape.html
5054

55+
5156
* `RFC 1`_: Aggregate data structure library
57+
* `RFC 2`_: Interface definition library
5258
* `RFC 3`_: Enumeration shapes
5359
* `RFC 4`_: Constant-castable expressions
5460
* `RFC 5`_: Remove ``Const.normalize``
@@ -79,6 +85,7 @@ Language changes
7985
* Changed: :class:`Cat` warns if an enumeration without an explicitly specified shape is used. (`RFC 3`_)
8086
* Deprecated: :meth:`Const.normalize`; use ``Const(value, shape).value`` instead of ``Const.normalize(value, shape)``. (`RFC 5`_)
8187
* Deprecated: :class:`Repl`; use :meth:`Value.replicate` instead. (`RFC 10`_)
88+
* Deprecated: :class:`Record`; use :mod:`amaranth.lib.data` and :mod:`amaranth.lib.wiring` instead. (`RFC 1`_, `RFC 2`_)
8289
* Removed: (deprecated in 0.1) casting of :class:`Shape` to and from a ``(width, signed)`` tuple.
8390
* Removed: (deprecated in 0.3) :class:`ast.UserValue`.
8491
* Removed: (deprecated in 0.3) support for ``# nmigen:`` linter instructions at the beginning of file.

0 commit comments

Comments
 (0)