Skip to content

docs/guide: Remove obsolete warning about undefined FSM states - #1684

Merged
whitequark merged 1 commit into
amaranth-lang:mainfrom
neuschaefer:warn
Sep 18, 2026
Merged

whitequark merged 1 commit into
amaranth-lang:mainfrom
neuschaefer:warn

Conversation

@neuschaefer

Copy link
Copy Markdown
Contributor
>>> m = Module()
>>> with m.FSM():
...     with m.State("Init"):
...         m.next = "Other"
...
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    with m.FSM():
         ~~~~~^^
  File "/usr/lib/python3.14/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/.../amaranth/amaranth/hdl/_dsl.py", line 480, in FSM
    raise NameError("FSM state '{}' is referenced but not defined"
                    .format(state_name))
NameError: FSM state 'Other' is referenced but not defined
>>>

>>> m = Module()
>>> with m.FSM():
...     with m.State("Init"):
...         m.next = "Other"
...
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    with m.FSM():
         ~~~~~^^
  File "/usr/lib/python3.14/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/.../amaranth/amaranth/hdl/_dsl.py", line 480, in FSM
    raise NameError("FSM state '{}' is referenced but not defined"
                    .format(state_name))
NameError: FSM state 'Other' is referenced but not defined
>>>
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.25%. Comparing base (56f1cab) to head (94368a9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1684   +/-   ##
=======================================
  Coverage   91.25%   91.25%           
=======================================
  Files          44       44           
  Lines       11527    11527           
  Branches     2245     2245           
=======================================
  Hits        10519    10519           
  Misses        846      846           
  Partials      162      162           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@whitequark whitequark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@whitequark
whitequark added this pull request to the merge queue Sep 18, 2026
Merged via the queue into amaranth-lang:main with commit 90449f1 Sep 18, 2026
21 of 23 checks passed
@neuschaefer
neuschaefer deleted the warn branch September 18, 2026 21:34

This branch was successfully deployed

1 active deployment
publish — 94368a97 Deployed Sep 13, 2026 by neuschaefer via publish-package #3935
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants