Skip to content

Rename mcproto.packets.abc to mcproto.packets.packet #41

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Jun 10, 2023

Conversation

Martysh12
Copy link
Contributor

No description provided.

Martysh12 added a commit to Martysh12/mcproto that referenced this pull request Feb 18, 2023
@Martysh12 Martysh12 marked this pull request as ready for review February 18, 2023 23:58
@Martysh12 Martysh12 requested a review from ItsDrike as a code owner February 18, 2023 23:58
Copy link
Member

@ItsDrike ItsDrike left a comment

Choose a reason for hiding this comment

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

Nice, but this is a breaking change, not an internal one, mcproto.packets.abc was absolutely a part of the public API, and people using this library are almost certainly importing something from there.

It might then also be worth it to consider whether we should add deprecations here, if not, a major version bump will be necessary for the next release containing this commit, which I'm not sure I like, as simple bugfix releases might need to be made before 1.0.0 is ready, and this would block all such releases due to an introduction of a breaking change.

Without deprecations, this PR is blocked until 1.0.0 is closer to being ready. Alternatively, this could get merged into a new temporary development branch for the 1.0.0 release, keeping the main branch without any such breaking changes, making it easy to release bugfixes if necessary, and keep the development of new things inside of this development branch.

@ItsDrike ItsDrike added p: 3 - low Can be done when there's time; nice-to-have things, doesn’t impact other tasks t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.) a: api Related to exposed core API of the project labels Feb 19, 2023
@Martysh12 Martysh12 closed this Feb 19, 2023
@Martysh12 Martysh12 deleted the internal/rename-abc-to-packet branch February 19, 2023 00:05
@Martysh12 Martysh12 restored the internal/rename-abc-to-packet branch February 19, 2023 00:08
@ItsDrike ItsDrike reopened this Feb 19, 2023
@ItsDrike ItsDrike added m: do-not-merge This PR can be reviewed, but cannot be merged now s: stalled Something is blocking further progress labels Feb 19, 2023
@ItsDrike
Copy link
Member

Blocked until 1.0.0 release comes closer, due to an introduction of a breaking change.

@ItsDrike
Copy link
Member

ItsDrike commented Jun 9, 2023

So, what's the reason for this rename? abc here suggest this file is holding abstract base classes, it's fairly common to see files named like this in many projects, why is packet better here?

Perhaps you assumed abc was a placeholder name which didn't mean anything, and was only used for the lack of better name? If so, that actually wasn't the case here. Any reason why you think the packet name works better here?

@ItsDrike ItsDrike added the m: breaking This introduces backwards compatibility breaking changes to the public API label Jun 9, 2023
@Martysh12
Copy link
Contributor Author

We've talked about this in Discord, and I'm pretty sure you're the one who suggested it:
Screenshot_20230610-015710_Discord.png

Also, sorry for being inactive in this project for such a long time. I've been working on other things.

@ItsDrike
Copy link
Member

ItsDrike commented Jun 9, 2023

We've talked about this in Discord, and I'm pretty sure you're the one who suggested it:

Ah, right, yeah I completely forgot about that discussion as it was a while, and without any issue alongside the PR, nor a description about it I really didn't think to go to DMs for the answer. Alright, that makes sense then.

Also, sorry for being inactive in this project for such a long time. I've been working on other things.

That's absolutely fine, we're all volunteers here, I also took a pretty long break from the project, but I do have some more time for it now.

Since #116 will be restructuring the entire project and will end up being a completely breaking change, I don't actually think that this breaking change needs to wait. Semantic versioning does allow breaking changes in minor version releases when <1.0.0. So, unless there's something else this needs doing, it can actually probbaly be merged already, and will be in the next (0.4.0) release.

@ItsDrike ItsDrike added s: needs review Author is waiting for someone to approve an issue/review a PR and removed m: do-not-merge This PR can be reviewed, but cannot be merged now s: stalled Something is blocking further progress labels Jun 9, 2023
Copy link
Member

@ItsDrike ItsDrike left a comment

Choose a reason for hiding this comment

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

LGTM. I will ask you to do a rebase (or at least a regular merge, though a rebase would be cleaner) with the main branch first though, as there were a lot of changes since. There shouldn't be any breaking changes atm, so it should be as simple as git rebase main hopefully.

@ItsDrike ItsDrike removed the s: needs review Author is waiting for someone to approve an issue/review a PR label Jun 10, 2023
@Martysh12
Copy link
Contributor Author

Looks like I messed up somewhere...

@ItsDrike ItsDrike force-pushed the internal/rename-abc-to-packet branch from 6f9e8e1 to 932c1b4 Compare June 10, 2023 17:44
@ItsDrike
Copy link
Member

Looks like I messed up somewhere...

No worries, I've performed the rebase for you and force-pushed. However it does seem like there were some changes in main which do affect your original chanegs (I've added tests for login state packets, which doesn't yet have the rename), causing the tests to fail.

You'll now want to do a force pull (git pull --force), overwriting your own local history with the one I pushed, and then create a new commit, renaming the login tests to also use the new mcproto.packets.packet, rather than mcproto.packets.abc (and perhaps in other places if there's more).

@Martysh12 Martysh12 requested a review from ItsDrike June 10, 2023 18:47
@ItsDrike ItsDrike merged commit 91c824f into py-mine:main Jun 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
a: api Related to exposed core API of the project m: breaking This introduces backwards compatibility breaking changes to the public API p: 3 - low Can be done when there's time; nice-to-have things, doesn’t impact other tasks t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants