Bug 290 - import error caused by soc.decoder.isa.all no longer being generated
Summary: import error caused by soc.decoder.isa.all no longer being generated
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Assignee: Luke Kenneth Casson Leighton
Depends on:
Reported: 2020-04-21 03:11 BST by Jacob Lifshay
Modified: 2020-04-21 12:15 BST (History)
1 user (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Lifshay 2020-04-21 03:11:17 BST
This is causing CI to fail and I finally got around to reproducing it locally:

After running git clean and rerunning src/doc/decoder/pseudo/pywriter.py:

ERROR: Failure: ModuleNotFoundError (No module named 'soc.decoder.isa.all')
Traceback (most recent call last):
  File "/home/jacob/.virtualenvs/libre-riscv-venv/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/jacob/.virtualenvs/libre-riscv-venv/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/jacob/.virtualenvs/libre-riscv-venv/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/jacob/.virtualenvs/libre-riscv-venv/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/jacob/.virtualenvs/libre-riscv-venv/lib/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/home/jacob/.virtualenvs/libre-riscv-venv/lib/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/jacob/projects/libreriscv/soc/src/soc/decoder/isa/test_caller.py", line 12, in <module>
    from soc.decoder.isa.all import ISA
ModuleNotFoundError: No module named 'soc.decoder.isa.all'

I'm on soc.git d557f4fb2a9e5b159c7abbdcd1d85712fabc6b9b
Comment 1 Luke Kenneth Casson Leighton 2020-04-21 04:28:11 BST
it's autogenerated, so make something has to be run as part of the setup. 4am now will look later.
Comment 2 Jacob Lifshay 2020-04-21 04:31:59 BST
To clarify, the error is triggered by running nosetests, pywriter.py completes successfully.
Comment 5 Luke Kenneth Casson Leighton 2020-04-21 05:28:42 BST
that was a mistake when i added extra registers
Comment 6 Jacob Lifshay 2020-04-21 05:48:03 BST
(In reply to Luke Kenneth Casson Leighton from comment #5)
> that was a mistake when i added extra registers

Uncommented it, which seems to have fixed this particular bug locally, will have to see if it works in CI.
Comment 7 Luke Kenneth Casson Leighton 2020-04-21 12:15:24 BST