Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI to add a proto file to config #13

Open
preiter93 opened this issue Feb 19, 2024 · 0 comments
Open

CLI to add a proto file to config #13

preiter93 opened this issue Feb 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@preiter93
Copy link
Owner

Add a 'wireman add file.proto' command line functionality which automatically adds file.proto and the path to the wireman.toml config.

  • Parse includes and files from current config.
  • Check if any path or subpath matches the path to file.proto.
  • Check if file.proto already exists in the config.
  • Figure out how to best add the file, i.e. which part of the path should be added to includes and what to files.

Adding values to a toml while preserving the original file can be achieved with the toml-edit crate. See https://github.com/toml-rs/toml/blob/main/crates/toml_edit/tests/testsuite/edit.rs#L588

@preiter93 preiter93 added the enhancement New feature or request label Feb 19, 2024
@preiter93 preiter93 changed the title Wireman add CLI CLI to add a proto file to config Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant