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

[v9] Remove Client type, rename BaseClient -> Client and use that instead #9840

Open
mydea opened this issue Dec 14, 2023 · 3 comments · May be fixed by #14800
Open

[v9] Remove Client type, rename BaseClient -> Client and use that instead #9840

mydea opened this issue Dec 14, 2023 · 3 comments · May be fixed by #14800
Assignees
Milestone

Comments

@mydea
Copy link
Member

mydea commented Dec 14, 2023

Currently, we have an abstract Client type in @sentry/types, and the BaseClient in core which implements this. However, since we use the Client type more or less everywhere, whenever we add something to the BaseClient we have to guard it because a user may have a custom Client that does not extend from the BaseClient (in theory), which bloats up our code.

So in v8, we should get rid of the abstract Client type and instead just make sure that every client always has to extend from BaseClient (then just Client), which means that we can add things to the Client more easily going forward.

@mydea mydea added this to the 8.0.0 milestone Dec 14, 2023
@mydea
Copy link
Member Author

mydea commented Dec 14, 2023

Supercedes #7727

@mydea mydea mentioned this issue Dec 14, 2023
@AbhiPrasad
Copy link
Member

This is really nice to have, but we realistically don't have the time for this, moving to v9 milestone.

@AbhiPrasad AbhiPrasad changed the title [v8] Remove Client type, rename BaseClient -> Client and use that instead Remove Client type, rename BaseClient -> Client and use that instead Mar 27, 2024
@AbhiPrasad AbhiPrasad modified the milestones: 8.0.0, 9.0.0 Mar 27, 2024
@lforst lforst removed this from the 9.0.0 milestone Nov 13, 2024
@lforst lforst changed the title Remove Client type, rename BaseClient -> Client and use that instead [v9] Remove Client type, rename BaseClient -> Client and use that instead Nov 13, 2024
@lforst
Copy link
Member

lforst commented Nov 13, 2024

This strongly depends on #14271

@lforst lforst added this to the 9.0.0 milestone Nov 14, 2024
mydea added a commit that referenced this issue Dec 17, 2024
…lass (#14721)

In v8, types have been exported from `@sentry/types`, while
implementations have been exported from other classes.
This lead to some duplication, where we had to keep an interface in
`@sentry/types`, while the implementation mirroring that interface was
kept e.g. in `@sentry/core`.
Since in v9 the types have been merged into `@sentry/core`, we can get
rid of some of this duplication. This means that certain things that
used to be a separate interface, will not expect an actual instance of
the class/concrete implementation. This should not affect most users,
unless you relied on passing things with a similar shape to internal
methods.

This PR removes the `Scope` interface, in favor of just using the scope
class everywhere.

This is related to
#9840

---------

Co-authored-by: Sigrid Huemer <[email protected]>
@mydea mydea self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants