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

Fix: Extensions should specify geyser api version instead of base api version #3880

Merged
merged 19 commits into from
Jul 31, 2024

Conversation

onebeastchris
Copy link
Member

@onebeastchris onebeastchris commented Jun 16, 2023

Relies on GeyserMC/api#2

Changes:

  • added geyserApiVersion() to Geyser API, which returns a ApiVersion class with a built in version compatibility check
  • Extensions are checked against Geyser API version now to prevent crashes when trying to load extensions using newer api than is provided - to account for the old way, we check if the version is 1.0.0.

@Konicai
Copy link
Member

Konicai commented Jun 19, 2023

Bumping the base api version seems to have fixed building.

Copy link
Member

@Konicai Konicai left a comment

Choose a reason for hiding this comment

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

Project lead needs to take a look at this

Copy link
Member

@Tim203 Tim203 left a comment

Choose a reason for hiding this comment

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

Besides these comments I'd remove the major,minor,patch fields of GeyserExtensionDescription and use ApiVersion there as well

@onebeastchris onebeastchris added the PR: On hold When a PR is on hold like if it requires a dependency to be updated first label Jul 1, 2023
@Konicai

This comment was marked as outdated.

# Conflicts:
#	api/src/main/java/org/geysermc/geyser/api/GeyserApi.java
#	core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionLoader.java
#	gradle/libs.versions.toml
@onebeastchris onebeastchris added API The issue/feature request relates to the Geyser API and removed PR: On hold When a PR is on hold like if it requires a dependency to be updated first labels Jul 10, 2024
@onebeastchris onebeastchris changed the base branch from master to api/2.4.1 July 12, 2024 09:17
@onebeastchris onebeastchris changed the title let extensions specify geyser api version instead of base api version Fix: Extensions should specify geyser api version instead of base api version Jul 14, 2024
@onebeastchris
Copy link
Member Author

onebeastchris commented Jul 23, 2024

Merge once GeyserMC/api#6 is merged - not merging now as the api/2.4.1 branch wont build if i do API publishing works now; merging

@onebeastchris onebeastchris merged commit 0bc960a into GeyserMC:api/2.4.1 Jul 31, 2024
2 checks passed
@onebeastchris onebeastchris deleted the extension-api-check branch July 31, 2024 22:11
Konicai added a commit that referenced this pull request Aug 1, 2024
)

* let extensions specify geyser api version instead of base api version

* fix spacing, @link formatting, properly check for compat

* Proper warning, update to API changes to also check patch version

* Bump base-api version

* adapt to new base api changes

* Actually bump to 2.4.1

* Update api/src/main/java/org/geysermc/geyser/api/extension/ExtensionDescription.java

* Address reviews

* Address reviews

* Update to latest base api changes; proper extension *human* version checking

* no need to apply a plugin, that's the default

---------

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API The issue/feature request relates to the Geyser API Extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants