getsentry / sentry-cli

A command line utility to work with Sentry.
https://docs.sentry.io/cli/
BSD 3-Clause "New" or "Revised" License
892 stars 222 forks source link

API refactor: Split data types into separate submodules #2077

Open szokeasaurusrex opened 4 weeks ago

szokeasaurusrex commented 4 weeks ago

Data types are types which exist primarily for serializing/deserializing request/response data. Examples include User and ReleaseStatus.

szokeasaurusrex commented 3 weeks ago

Or, perhaps it makes more sense to move this into sentry-rust

stephanie-anderson commented 3 weeks ago

Maybe get @Swatinem or @loewenheim's opinion on that

Swatinem commented 3 weeks ago

Also discussed with @elramen recently that IMO we shouldn’t bloat the SDK with types and definitions that are not directly useful for the SDK itself.

szokeasaurusrex commented 3 weeks ago

@Swatinem I was considering that we might implement this change as a new feature under sentry-types, so as not to increase binary size when not needed. The benefit would be that we could reuse this code in other Rust packages.

However, you have a fair point – the code would be, at least initially, only used in the CLI, so probably makes more sense to keep the code in the CLI. We can always reevaluate later.

Another idea I had would be perhaps that we could work towards splitting off reusable CLI code into a separate library (or perhaps, multiple libraries), which the CLI would use, and which we could reuse elsewhere. But, this would probably be a more long-term initiative