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

Access beatmap store via abstract base class #31076

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

peppy
Copy link
Member

@peppy peppy commented Dec 11, 2024

The intention here is to make things more testable going forward. Specifically, to remove the "back-door" entrance into BeatmapCarousel where BeatmapSets can be set by tests and bypas/block realm retrieval.

A few code quality improvements thrown in. Was on the fence as to whether I should actually remove the BeatmapSets test flow in BeatmapCarousel since I am currently looking at replacing/rewriting that class completely, but it was low effort.

The intention here is to make things more testable going forward.
Specifically, to remove the "back-door" entrance into `BeatmapCarousel`
where `BeatmapSets` can be set by tests and bypas/block realm retrieval.
@peppy peppy force-pushed the beatmap-store-interface branch from 106b00b to a868c33 Compare December 11, 2024 07:28
Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems pretty good 👍

Comment on lines -249 to -251
// This is performing an unnecessary second lookup on realm (in addition to the subscription), but for performance reasons
// we require it to be separate: the subscription's initial callback (with `ChangeSet` of `null`) will run on the update
// thread. If we attempt to detach beatmaps in this callback the game will fall over (it takes time).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should probably remain in source? I don't see any reason why it would no longer be valid.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed IRL, comment should have been deleted in 466ed5d

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pending confirmation of CI pass

@bdach bdach merged commit 4e4a99d into ppy:master Dec 11, 2024
10 checks passed
@peppy peppy deleted the beatmap-store-interface branch December 22, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants