twilight icon indicating copy to clipboard operation
twilight copied to clipboard

refactor(model)!: flatten `CommandOption`

Open vilgotf opened this issue 2 years ago • 3 comments

  • Simplifies and fixes errors in CommandOption {de,}serialization by delegating to the derive implementation.
  • Removes duplicated shared fields for CommandOption and CommandOptionChocie variants.
  • Documents all public fields.
  • Added a note in the command module recommending users to use the CommandBuilder.
  • CommandBuilder retains its API, but is internally more complicated.

Overall this PR reduces internal complexity by a lot.

vilgotf avatar Jul 03 '22 16:07 vilgotf

I also want to improve Command's documentation to be like CommandOption's, but I think that should be in a separate PR as this PR is already big enough.

vilgotf avatar Jul 19 '22 07:07 vilgotf

Should a follow-up PR be created to sync (duplicate) the docs on CommandOption to the builders in util::builder::command? Perhaps it's easier to cross link to the model docs (as the docs would otherwise risk getting out of sync)?

vilgotf avatar Sep 22 '22 06:09 vilgotf

I think it would be good to just link to the docs in a follow up, yes

7596ff avatar Sep 22 '22 19:09 7596ff

@Erk- PTAL

vilgotf avatar Oct 01 '22 18:10 vilgotf