Skip to content

Fixed NoSuchMethodException when running tests on Spigot (Closes #7553)#7558

Merged
sovdeeth merged 8 commits into
SkriptLang:dev/patchfrom
JakeGBLP:dev/patch
Feb 28, 2025
Merged

Fixed NoSuchMethodException when running tests on Spigot (Closes #7553)#7558
sovdeeth merged 8 commits into
SkriptLang:dev/patchfrom
JakeGBLP:dev/patch

Conversation

@JakeGBLP
Copy link
Copy Markdown
Contributor

@JakeGBLP JakeGBLP commented Jan 30, 2025

Description

Added chunk-load wait before running tests (when not in DEV_MODE) that doesn't require PaperMC to Skript.class.


Target Minecraft Versions: any
Requirements: Spigot
Related Issues: #7553

Comment thread src/main/java/ch/njol/skript/Skript.java Outdated
@Efnilite Efnilite added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 30, 2025
Copy link
Copy Markdown
Contributor

@abandonedaccount6235 abandonedaccount6235 left a comment

Choose a reason for hiding this comment

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

I don't think it makes sense to add spigot support when we are about to drop spigot support.

@abandonedaccount6235 abandonedaccount6235 added enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question and removed bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. labels Jan 30, 2025
@JakeGBLP
Copy link
Copy Markdown
Contributor Author

It's not a high effort change, for the duration of 2.10, and perhaps 2.11 if end of spigot support is delayed, I'd like this to be fixed, but even then if nothing is reverted and the end of support simply consists in not checking if the server is running paper when adding something from it then this would be very good, it would be helpful to me and anybody else looking to support spigot EVEN if skript doesn't do that itself and assuming that it loads with no issues.

Comment thread src/main/java/ch/njol/skript/Skript.java Outdated
Comment thread src/main/java/ch/njol/skript/Skript.java Outdated
@ShaneBeee
Copy link
Copy Markdown
Contributor

ShaneBeee commented Jan 30, 2025

It's not a high effort change, for the duration of 2.10, and perhaps 2.11 if end of spigot support is delayed, I'd like this to be fixed, but even then if nothing is reverted and the end of support simply consists in not checking if the server is running paper when adding something from it then this would be very good, it would be helpful to me and anybody else looking to support spigot EVEN if skript doesn't do that itself and assuming that it loads with no issues.

correct me if Im wrong, but tests are ONLY run on Paper.
After reading your changes and commenting on it.... I just wanted to point out there is no async chunk loading when running dev mode. Outside of dev mode, all tests are run on Paper servers.

@JakeGBLP
Copy link
Copy Markdown
Contributor Author

It's not a high effort change, for the duration of 2.10, and perhaps 2.11 if end of spigot support is delayed, I'd like this to be fixed, but even then if nothing is reverted and the end of support simply consists in not checking if the server is running paper when adding something from it then this would be very good, it would be helpful to me and anybody else looking to support spigot EVEN if skript doesn't do that itself and assuming that it loads with no issues.

correct me if Im wrong, but tests are ONLY run on Paper. After reading your changes and commenting on it.... I just wanted to point out there is no async chunk loading when running dev mode. Outside of dev mode, all tests are run on Paper servers.

The goal of this PR is to handle the scenario in which an addon were to run tests on Spigot since Skript only runs them on Paper.

Comment thread src/main/java/ch/njol/skript/Skript.java Outdated
@Absolutionism
Copy link
Copy Markdown
Contributor

Absolutionism commented Jan 30, 2025

I don't think it makes sense to add spigot support when we are about to drop spigot support.

In my opinion, Jakes reasons are valid. Even though Skript does plan on dropping support for Spigot, nothing has been said as what version of Skript will be doing so. If the team does plan on dropping support for 2.11 or any version after, regardless, 2.10 still supports Spigot. So we should be fixing any bugs that occur before parting ways. Meaning we need to fix the test environment (this PR) in order to find and fix any bugs/errors.
For instance, both Shane and Sovde had tested on Spigot and found bugs which PRs were made to fix and have been merged for 2.10.

@Absolutionism
Copy link
Copy Markdown
Contributor

With that said, the labels need to be changed. Removing enhancement and adding back bug so it can appropriately be marked and merged for the next patch release.

@ShaneBeee
Copy link
Copy Markdown
Contributor

With that said, the labels need to be changed. Removing enhancement and adding back bug so it can appropriately be marked and merged for the next patch release.

Its not a bug tho.
Jake copy/pasted Skript's Test platform runner classes, and added his own environments... this isn't something Skript was meant to do.
There is no bug here, Skript's testing environment was setup to use Paper, and works as it was intended to.
Nothing is broken.

Requested from @sovdeeth

Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
@JakeGBLP
Copy link
Copy Markdown
Contributor Author

JakeGBLP commented Jan 31, 2025

With that said, the labels need to be changed. Removing enhancement and adding back bug so it can appropriately be marked and merged for the next patch release.

Its not a bug tho. Jake copy/pasted Skript's Test platform runner classes, and added his own environments... this isn't something Skript was meant to do. There is no bug here, Skript's testing environment was setup to use Paper, and works as it was intended to. Nothing is broken.

I think it's more of something nobody wanted to be bothered to do, spigot support has almost become an optional over the last few updates, that being said I think having spigot tests is ideal for a Spigot-supporting plugin, so if that were to be the plan it would be convenient to have them; some people don't love having many testing environments, I don't mind it at all, it's very helpful since it's fully automated (once you set it up) and makes tests all the more worthwhile since we go from running a few environments to a bunch of them if not ALL of them.

TL;DR: if we consider Skript as a spigot plugin then this is a bug.

@JakeGBLP JakeGBLP requested a review from sovdeeth February 2, 2025 10:50
@sovdeeth
Copy link
Copy Markdown
Member

sovdeeth commented Feb 2, 2025

this isn't a bug, period. That said, using paperlib to have broader support without, like, any downside seems like a fine enhancement.

@sovdeeth sovdeeth removed the up for debate When the decision is yet to be debated on the issue in question label Feb 22, 2025
@sovdeeth sovdeeth dismissed abandonedaccount6235’s stale review February 28, 2025 03:14

up for debate resolved

@sovdeeth sovdeeth added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Feb 28, 2025
@sovdeeth sovdeeth merged commit 74e7bde into SkriptLang:dev/patch Feb 28, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
…ptLang#7553) (SkriptLang#7558)

* Added spigot semi-equivalent of the "get chunk at async" method.

* Removed listening code as 'getChunkAt' is called synchronously.

* Removed unused imports.

* Switched to PaperLib method that handles chunk loading.

* Removed accidental boolean negation.

* Added requested changes

Requested from @sovdeeth

Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>

---------

Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request, an issue about something that could be improved, or a PR improving something. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants