-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Expose client version information in non-debug builds #15708
Conversation
The PR has been changed to only expose the version string field now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the PR in the current version (pun intended)
I think what we should do to further discourage doing version comparisons is to actually provide documentation on which protocol version maps to which engine version (or perhaps just link to networkprotocol.h?). |
IRC:
|
I took the liberty to implement this. Is it fine now? One minor question perhaps: We want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor question perhaps: We want
core.protocol_versions
to not contain patch versions, even if they entailed a protocol version bump, correct?
Hmm, I feel like it's inconsistent to leave a protocol version out just because it corresponds to a patch version. The reason to bump the protocol version for a patch version would be to make it detectable on the server, so leaving it out of the mechanism for making detection easier doesn't make sense. In builtin, one of the two cases where the protocol version is used for client feature detection is actually the 45/5.9.1 case.
I think we want one entry in that table for every changed protocol version. No matter if it's minor or not. Or to be exact we should define the table contents as follows:
(in theory we could bump the protocol version twice during dev, this should only result in one entry) Also: we could add a simple devtest unittest to check that the client protocol version is present in the table FWIW we can merge this now and improve docs and tests later. |
I am slightly on the fence about this, but there is a reason.
Detectable for whom? A patch version should not introduce any new features for API users; therefore, why would an API user be interested in detecting it (well, workarounds maybe I suppose, but that would also apply to patch versions which don't get their own protocol version)? The API feature set should not have changed.
Yes, I remember, but (1) this is in builtin, not in mod code; (2) 5.9.1 did in fact add a very minor feature to enable us to fix the minimap bug as I recall. Maybe 5.9.1 should, in hindsight, never have been a "patch" release, but rather a "minor" release. It's still the exception in that all other patch releases don't have their own protocol version, which raises a nasty question of: When does something get an entry? sfan has phrased this precisely, but I don't think it's very intuitive for an API user. In fact, I'd probably even go one step further and consider: No more patch releases. Only minor releases. Problem with that is that package maintainers love patch releases and won't prioritize minor releases (even if they mostly fix bugs) the same way. |
If we keep on a quick release schedule, then in general sure. But we'll need to do patch releases if big security issues show up. |
Fair, but will those need separate protocol versions? |
Alright, I have now added all 5.x protocol versions to Should you change your mind, just revert that commit. |
No. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated test seems okay
Closes #14151.
The client version information that has previously only been available in debug builds are now always available. Serialisation version and client status still remain behind the debug check.
To do
This PR is a Ready for Review.
How to test
e.g. worldedit //lua command in singleplayer: