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

Create client.session package #3644

Merged
merged 2 commits into from
Sep 2, 2023
Merged

Conversation

apple502j
Copy link
Contributor

Client packages are mostly well-organized, except for one thing: there is no package dedicated to authlib interactions. This was fine a few years ago, when the only class that would interact with authlib was Session. Since then, however, the role of authlib in client code has expanded. This has forced us to package them in the (already-big) util package, or in the case of abuse reports, make a package directly under client package, for one relatively small feature.

I propose a repackaging, to establish "session" package and to move all authlib-interacting code there. This should have little impact outside of mods that disable reports or telemetry; however, since there are tons of mods touching this very specific stuff, it is nevertheless impactful.

@apple502j apple502j added refactor A PR that renames existing names. snapshot A PR that targets a snapshot version of Minecraft impactful A change that is likely to affect some mods. Will require more reviews. labels Aug 27, 2023
@apple502j apple502j requested a review from a team August 27, 2023 09:13
Juuxel
Juuxel previously approved these changes Aug 27, 2023
@Juuxel Juuxel requested a review from a team August 27, 2023 11:07
@liach
Copy link
Contributor

liach commented Aug 27, 2023

Looks great! Two comments:

  1. Should the telemetry go under session package? Many of the events have little to do with sessions, so I think it can still directly go under client.
  2. The log package in report can probably just be merged into the report package.

@apple502j
Copy link
Contributor Author

  • Telemetry is pretty much a feature used to talk to Mojang servers, so this is probably the best place.
  • Think the log package can stay as well.

@liach
Copy link
Contributor

liach commented Aug 30, 2023

Telemetry is pretty much a feature used to talk to Mojang servers

It's like "block and entities are part of the world". The telemetry package is already huge, almost larger than sessions because much of telemetry does not immediately talk to Mojang server, just like most code of blocks/entities doesn't immediately interact with rca region files.

In addition, how much of report depends on sessions? It might merit its own package as well. Reports and telemetries are users of session, and you don't group your users into your subpackage (like how report.log is used by report, not using report)

@apple502j apple502j added the update-base Add this label to a pull request to automatically change the target branch to the default branch. label Aug 30, 2023
@github-actions github-actions bot changed the base branch from 23w33a to 23w35a August 30, 2023 23:29
@github-actions github-actions bot dismissed Juuxel’s stale review August 30, 2023 23:29

The base branch was changed.

@github-actions
Copy link
Contributor

🚀 Target branch has been updated to 23w35a

@github-actions
Copy link
Contributor

🚨 Please fix merge conflicts before this can be merged

@github-actions github-actions bot added outdated A PR that targets an outdated branch. and removed update-base Add this label to a pull request to automatically change the target branch to the default branch. labels Aug 30, 2023
@apple502j apple502j removed the outdated A PR that targets an outdated branch. label Sep 2, 2023
Copy link
Contributor

@liach liach left a comment

Choose a reason for hiding this comment

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

This package nesting isn't too deep, so it's ok I think

@YanisBft YanisBft merged commit 807efe7 into FabricMC:23w35a Sep 2, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impactful A change that is likely to affect some mods. Will require more reviews. refactor A PR that renames existing names. snapshot A PR that targets a snapshot version of Minecraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants