lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.45k stars 733 forks source link

[bazel] Re-examine use of `kwargs` in implementaion functions #19933

Open cfrantz opened 9 months ago

cfrantz commented 9 months ago

Currently, many of the low-level transformation functions in the new rules use kwargs to accept optional arguments that one would expect to be provided in a rules context object. The reason for this is so that such functions can serve both as rule implemention functions and as utility functions called by other rules. It may be cleaner to explicitly specify all arguments rather than using the current kwargs scheme.

matutem commented 9 months ago

I tend to agree, because otherwise it can be a mess to know how to really use a rule: what it needs and what is optional, and what it will just ignore.