Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce the
build
command in the CLI
This commit introduces a `build` command in the CLI, which behaves exactly as the compile command and introduces a deprecation warning to the existing `compile` command. Additionally, as a preparation for the CLI redesign discussed in bytecodealliance#702, this commit introduces a small refactoring of the code generation process, by: * Introducing a code generator builder, to abstract and validate all the code generation option combinations. * Introducing proper static and dynamic code generator modules, making it easier to divide the responsilibities of each. The main motivation for the refactoring is to: * Make it easier to finalize the CLI redesign. * Share code between the `compile` and `build` command while they must be equivalent. * Make it easier to keep the `compile` command frozen while it becomes deprecated and at the same time evolve the `build` command independently. NB: Given that the `compile` and `build` command are exactly the same, and that this change is purely mechanical; this change doesn't introduce integration tests for the `build` command. The plan is to introduce tests once other options are added to the `build` command as part of the CLI redesign. Alternatively, tests can be added, however, it would require either duplicating the entire test suite or adding testing infrastructure to minimize duplication, which will increase the size of the change.
- Loading branch information