-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
The configuration loading stage within DVSim is probably the most fragile part of DVSim. Small changes often result in unexpected behaviour. It's difficult to work out what fields are required as there is no clear schema.
There is a wildcard mechanism which allows internal reference to other configuration fields, environment variables, and embedded shell commands ("{eval_cmd} git status"). Due to #17 the evaluation of these wildcards is not commutative, so the evaluation order matters (ideally we would remove shell evaluations from the HJSON).
Proposed improvements:
- Add unit tests to capture the existing behaviours
- Separate the configuration loading to an independent stage.
- Evaluate the wildcards as early as possible in the flow.
- Introduce a clear schema for the config format - using pydantic to validate the config file format.
Several attempts have been made at refactoring DVSim and the configuration loading mechanism is generally where regressions are inadvertently introduced.
Metadata
Metadata
Assignees
Labels
No labels