-
Notifications
You must be signed in to change notification settings - Fork 0
Bump version to 3.11.2 and update dependencies #347
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
007a694
🔧 chore: update version to 3.11.2 and dependency versions
twisti-dev d33ac0e
🔧 chore(deps): update configurate dependencies and adjust relocation …
twisti-dev cacd085
🔧 chore: register backwards compatible serializers in SpongeConfigMan…
twisti-dev 58ebf19
🔧 chore: update backwards compatible serializer registration in Spong…
twisti-dev 237710f
🔧 chore: update exception handling to catch Throwable in SpongeConfig…
twisti-dev 819c174
🔧 chore: update comments for clarity in SpongeConfigManager
twisti-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...rf-api-core/src/main/java/dev/slne/surf/api/core/config/manager/OldSpongeReflections.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| package dev.slne.surf.api.core.config.manager; | ||
|
|
||
| import org.jspecify.annotations.NullMarked; | ||
|
|
||
| import java.lang.annotation.Annotation; | ||
| import java.lang.invoke.MethodHandle; | ||
| import java.lang.invoke.MethodHandles; | ||
| import java.lang.invoke.MethodType; | ||
|
|
||
| @SuppressWarnings("unchecked") | ||
| @NullMarked | ||
| final class OldSpongeReflections { | ||
| static final Class<? extends Annotation> OLD_CONFIG_SERIALIZABLE_ANNOTATION; | ||
| static final Class<? extends Annotation> OLD_COMMENT_ANNOTATION; | ||
| static final Class<? extends Annotation> OLD_MATCHES_ANNOTATION; | ||
| static final Class<? extends Annotation> OLD_REQUIRED_ANNOTATION; | ||
| static final Class<? extends Annotation> OLD_SETTING_ANNOTATION; | ||
|
|
||
| private static final MethodHandle OLD_COMMENT_OVERRIDE; | ||
| private static final MethodHandle OLD_COMMENT_VALUE; | ||
|
|
||
| private static final MethodHandle OLD_MATCHES_VALUE; | ||
| private static final MethodHandle OLD_MATCHES_FLAGS; | ||
| private static final MethodHandle OLD_MATCHES_FAILURE_MESSAGE; | ||
|
|
||
| private static final MethodHandle OLD_SETTING_VALUE; | ||
| private static final MethodHandle OLD_SETTING_NODE_FROM_PARENT; | ||
|
|
||
| static boolean isCommentOverride(final Annotation annotation) throws Throwable { | ||
| return (boolean) OLD_COMMENT_OVERRIDE.invoke(annotation); | ||
| } | ||
|
|
||
| static String getCommentValue(final Annotation annotation) throws Throwable { | ||
| return (String) OLD_COMMENT_VALUE.invoke(annotation); | ||
| } | ||
|
|
||
| static String getMatchesValue(final Annotation annotation) throws Throwable { | ||
| return (String) OLD_MATCHES_VALUE.invoke(annotation); | ||
| } | ||
|
|
||
| static int getMatchesFlags(final Annotation annotation) throws Throwable { | ||
| return (int) OLD_MATCHES_FLAGS.invoke(annotation); | ||
| } | ||
|
|
||
| static String getMatchesFailureMessage(final Annotation annotation) throws Throwable { | ||
| return (String) OLD_MATCHES_FAILURE_MESSAGE.invoke(annotation); | ||
| } | ||
|
|
||
| static String getSettingValue(final Annotation annotation) throws Throwable { | ||
| return (String) OLD_SETTING_VALUE.invoke(annotation); | ||
| } | ||
|
|
||
| static boolean isSettingNodeFromParent(final Annotation annotation) throws Throwable { | ||
| return (boolean) OLD_SETTING_NODE_FROM_PARENT.invoke(annotation); | ||
| } | ||
|
|
||
| static { | ||
| try { | ||
| final MethodHandles.Lookup lookup = MethodHandles.lookup(); | ||
|
|
||
| OLD_CONFIG_SERIALIZABLE_ANNOTATION = (Class<? extends Annotation>) Class.forName("org.spongepowered".concat(".configurate.objectmapping.ConfigSerializable")); | ||
| OLD_COMMENT_ANNOTATION = (Class<? extends Annotation>) Class.forName("org.spongepowered".concat(".configurate.objectmapping.meta.Comment")); | ||
| OLD_MATCHES_ANNOTATION = (Class<? extends Annotation>) Class.forName("org.spongepowered".concat(".configurate.objectmapping.meta.Matches")); | ||
| OLD_REQUIRED_ANNOTATION = (Class<? extends Annotation>) Class.forName("org.spongepowered".concat(".configurate.objectmapping.meta.Required")); | ||
| OLD_SETTING_ANNOTATION = (Class<? extends Annotation>) Class.forName("org.spongepowered".concat(".configurate.objectmapping.meta.Setting")); | ||
|
twisti-dev marked this conversation as resolved.
|
||
|
|
||
| OLD_COMMENT_OVERRIDE = lookup.findVirtual(OLD_COMMENT_ANNOTATION, "override", MethodType.methodType(boolean.class)); | ||
| OLD_COMMENT_VALUE = lookup.findVirtual(OLD_COMMENT_ANNOTATION, "value", MethodType.methodType(String.class)); | ||
|
|
||
| OLD_MATCHES_VALUE = lookup.findVirtual(OLD_MATCHES_ANNOTATION, "value", MethodType.methodType(String.class)); | ||
| OLD_MATCHES_FLAGS = lookup.findVirtual(OLD_MATCHES_ANNOTATION, "flags", MethodType.methodType(int.class)); | ||
| OLD_MATCHES_FAILURE_MESSAGE = lookup.findVirtual(OLD_MATCHES_ANNOTATION, "failureMessage", MethodType.methodType(String.class)); | ||
|
|
||
| OLD_SETTING_VALUE = lookup.findVirtual(OLD_SETTING_ANNOTATION, "value", MethodType.methodType(String.class)); | ||
| OLD_SETTING_NODE_FROM_PARENT = lookup.findVirtual(OLD_SETTING_ANNOTATION, "nodeFromParent", MethodType.methodType(boolean.class)); | ||
|
|
||
| } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException e) { | ||
| throw new ExceptionInInitializerError(e); | ||
|
twisti-dev marked this conversation as resolved.
|
||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.