Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
94 stars 13 forks source link

Create butane_cli lib.rs #66

Closed jayvdb closed 1 year ago

jayvdb commented 1 year ago

Closes https://github.com/Electron100/butane/issues/65

jayvdb commented 1 year ago

The console prints are desirable to me. The exit probably isnt ideal, but it is reasonable for my use case.

My usage is driving multiple "cli" steps from a utility to ensure all necessary steps and checks are done, avoiding reliance on developers doing the process and allowing CI to fail if the steps havent been done. for me, failure during the cli steps is appropriate to cause my utility to also fail.

But this is only a very quick WIP so far, and can be improved to be more useful to a wider audience. However I dont think it needs to be over-engineered, as I think it is more important that this PR does the work needed to strongly discourage anyone from using the lib unless they expect & accept breakages in the future due to the highly volatile nature of the inner workings of this crate, since its primary objective is to be a CLI , not a lib.

Electron100 commented 1 year ago

Sounds good. The boundary feels a bit hacky/unprincipled but as long as it's being commented unstable I'm on board.

jayvdb commented 1 year ago

@Electron100 , are you happy for this to go in as-is, or do you want me to do some of the lib-ification that you mentioned above, all of which I agree with, but I think they can be done only when the cli needs cause those types of improvements to be necessary

jayvdb commented 1 year ago

Now it is published, we can see it worked at https://docs.rs/butane_cli/latest/butane_cli/