Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Give a better error message on a silly --tool value

未关闭
#233 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python

调研方向

首先跟踪 --tool 值如何展开 import_cfgs 条目,例如 common_project_cfg.hjson 和 {tool}.hjson。当缺少工具特定文件时,能够生成有帮助的错误,指出缺少的路径和通配符值,或者以其他方式清楚地解释无效的 --tool 值,即表示工作完成。

由索引模型根据 Issue 内容生成。

描述

This was originally reported in OpenTitan in 2020.

The basic problem is that dvsim tries too hard to load tool-specific files. For example:

Image

I think it's kind of nice that dvsim doesn't care what tools you have installed, but surely we can spit out a more helpful error message. That file is getting loaded because OpenTitan has this in common_sim_cfg.hjson:

  import_cfgs:      ["{proj_root}/hw/data/common_project_cfg.hjson",
                     "{dv_root}/tools/dvsim/common_modes.hjson",
                     "{dv_root}/tools/dvsim/fusesoc.hjson",
                     "{dv_root}/tools/dvsim/bazel.hjson",
                     "{dv_root}/tools/dvsim/{tool}.hjson"]

I wonder whether we should add a magic "test_files" key or similar that would allow the tool die with a message saying "The file path/to/foobar.hjson does not exist. The path was computed from the following wildcards: is one of them wrong?"

主要语言
Python
星标
15
派生
22
平均合并
4 天 46 分钟
30 天内合并 PR
6

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lowRISC/dvsim 的其他 Issue

查看 lowRISC/dvsim 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。