Move plugin validation to the codegen crate by jeffcharles · Pull Request #977 · bytecodealliance/javy

Description of the change

Moves plugin validation from the CLI crate into the javy-codegen crate. This results in a breaking change in the codegen crate's API.

Why am I making this change?

As part of implementing our RFC to change Javy's plugin format, I think it makes sense for the codegen crate to validate the plugin it's given so we can return a helpful error message if the plugin is invalid as opposed to having the plugin fail later with an error message that may be hard to decipher.

Checklist

  • I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli, javy-plugin, and javy-plugin-processing do not require updating CHANGELOG files.
  • I've updated the relevant crate versions if necessary. Versioning policy for library crates
  • I've updated documentation including crate documentation if necessary.