Skip to content

Tools specification#457

Open
marnovandermaas wants to merge 1 commit into
lowRISC:mainfrom
marnovandermaas:tools
Open

Tools specification#457
marnovandermaas wants to merge 1 commit into
lowRISC:mainfrom
marnovandermaas:tools

Conversation

@marnovandermaas
Copy link
Copy Markdown
Collaborator

@marnovandermaas marnovandermaas commented Apr 22, 2026

What tools do we need for Mocha and validate this against our schema.

Closes: #439

@marnovandermaas marnovandermaas force-pushed the tools branch 2 times, most recently from 6270b2a to 16750ab Compare April 22, 2026 10:49
@marnovandermaas marnovandermaas marked this pull request as draft April 23, 2026 10:46
@marnovandermaas
Copy link
Copy Markdown
Collaborator Author

@ziuziakowska mentioned that we should probably use a Python library to validate this: https://python-jsonschema.readthedocs.io/en/stable/validate/
This avoids adding Node as a dependency.

Comment thread flake.nix Outdated
gtkwave
openfpgaloader
openocd
nodejs
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not very keen on adding nodejs as a dependency only for the json schema validation. I suggesting using either python or compiled tools, a few options are:

  • jsonschema-cli: a Rust binary and can be installed with nix.
  • check-jsonschema: a Python script that can be installed with uv.
  • Our own script based on opentitan json schema linter.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've gone for the Python checking although I didn't know about the check-jsonschema.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The check-jsonschema script doesn't allow downloading a JSON file from the internet. Not sure if you would prefer a wget and then a check-jsonschema call or the Python script that I have now prepared in the utilities folder.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Using wget would requirer a wrapper script? Then It would be better to use check-jsonschema as a python lib and use request to donwload the JSON.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Are you happy with my current script that uses jsonschema directly or should I move to check-jsonschema?

Copy link
Copy Markdown
Collaborator

@engdoreis engdoreis left a comment

Choose a reason for hiding this comment

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

This is a good feature but I left a comment about the dependencies.

@marnovandermaas marnovandermaas force-pushed the tools branch 7 times, most recently from 48fd8bc to c3271dd Compare May 27, 2026 14:25
This adds a file called tool_data.json which specifies all the tools
that we are dependent on. The commit also valides this against a
standard schema defined here:
https://github.com/marnovandermaas/tool-schema/blob/main/tool_schema.json

It also checks the schema using a Python library.
@marnovandermaas marnovandermaas marked this pull request as ready for review May 27, 2026 14:37
Comment thread package.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since you're not using nodejs anymore this file can be removed.

Comment thread tool_data.json
{
"name": "Verilator",
"vendor": "Veripool",
"version": "v5.0.40",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"version": "v5.0.40",
"version": "v5.040",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define tool versions

3 participants