lowRISC / lowRISC/opentitan

[tock] rustfmt_fix fails with a missing tests module

Open
#22,737 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

```
$ bazel run //quality:rustfmt_fix
INFO: Analyzed target //quality:rustfmt_fix (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
INFO: Elapsed time: 0.881s, Critical Path: 0.38s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/quality/rustfmt_fix.bash
Error writing files: failed to resolve mod `tests`: /sw/device/silicon_owner/tock/kernel/src/tests.rs does not exist
```

The described file indeed does not exist. If it's supposed to be autogenerated by something A) it's discouraged to put generated files next to non-generated files for reasons like this and B) it should be a (transitive) dependency of the `rustfmt_fix` rule.

Contributor guide

Open the contributing guide

Research direction

Start by running bazel run //quality:rustfmt_fix and inspect the rustfmt_fix rule alongside sw/device/silicon_owner/tock/kernel/src/tests.rs. Trace how the missing tests module is expected to be provided, then ensure the rule completes without the missing-file error and that its dependency handling matches the repository's generation setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.