Skip to content

Proposal: move op enum generation into build process #340

@Dewb

Description

@Dewb

The build process currently consumes op_enums.h from source control; this is a generated file that must be manually regenerated if src/ops/op.c changes. Proposal: remove op_enums.h from source control, add it as a target to src/module/Makefile and src/simulator/Makefile, and run the Python script to generate it during the build.

Pros:

  • The developer documentation could be simplified
  • Codegen output would always be current, no chance of forgetting to run the script when necessary
  • Would be easier to change codegen strategies in the future without making devs relearn new manual steps

Cons:

  • The generated IDs in op_enums.h would no longer be visible/searchable in GitHub
  • Python (and/or any other future codegen dependencies) would always be a requirement for building the firmware, instead of just being a requirement for adding new ops
  • Build process would get a little bit longer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions