Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Introducing: Yatoclip #360

Merged
merged 3 commits into from
Jan 25, 2021
Merged

Introducing: Yatoclip #360

merged 3 commits into from
Jan 25, 2021

Conversation

ishland
Copy link
Contributor

@ishland ishland commented Jan 25, 2021

A faster jardiff system

How it builds yatoclip:

  • Compares server artifact with member-mapped vanilla minecraft jar.
  • Creates diffs under class level
  • Pack it

How it patches jar:

  • Fetches BuildData and vanilla jar
  • Apply spigot mappings to member-mapped level
  • Apply generated patches under class level
  • Copy other files which is untouched by patching
  • Pack it

FAQ

Q: Why not use final-mapped jars
A: Final-mapped jar outputs are different each time

@ishland ishland added this to In progress in Yatopia via automation Jan 25, 2021
@ishland ishland self-assigned this Jan 25, 2021
@ishland ishland changed the base branch from ver/1.16.5 to staging/1.16.5 January 25, 2021 16:15
@ishland ishland merged commit 2243765 into staging/1.16.5 Jan 25, 2021
Yatopia automation moved this from In progress to Done Jan 25, 2021
@ishland ishland deleted the dev/faster-launcher-jar branch January 25, 2021 16:15
@ishland ishland restored the dev/faster-launcher-jar branch January 25, 2021 16:15
@ishland ishland deleted the dev/faster-launcher-jar branch January 25, 2021 16:17
ishland added a commit that referenced this pull request Feb 1, 2021
* add config for sand duping (#352)

* Lithium: cache chunk gen sea level (#349)

based off: CaffeineMC/lithium-fabric@a55cfd1

* PaperPR: Inline shift fields in EnumDirection (#350)

* Introducing: Yatoclip (#360)

* New async nbt cache (#347)

* update pom

* whoops

* Try to address path issue and improve Jenkins build speed

* Detailed lag and crash reports (#369)

Added "Suspected Plugins" to Watchdog and crash reports

* Drop sand duping

* Add branch specific versions

* Remove copyright

* Revert mysql-connector-java version bump

* Small fixes

* More detailed lag and crash reports

* Don't use branch information when generating metadata

* Fix Jenkins Builds version command

* Fixup patches

* Fix patch notes

* Pull Request compatibility for branch detection

* Fix Pull Request compatibility for branch detection

* Set context classloader before launch

* Inject server jar to SystemClassLoader before launch

* Try fix compile in java8

* Run tests on CodeMC and Github Actions

Co-authored-by: Simon Gardling <Titaniumtown@gmail.com>
Co-authored-by: Zoe <duplexsys@protonmail.com>
Co-authored-by: Hugo Planque <12386279+HookWoods@users.noreply.github.com>
@TheDGOfficial
Copy link

This so much slower than Paperclip in my testing, and prints too much verbose messages. I don't exactly know what paperclip does but it takes little time to do its thing, and it works. But this more like Spigot's BuildTools, which takes time.

I was running git-Yatopia-17 on my test server and found out 18 and 19 is released, so decided to try them. (I'm not using Yatopia, but I have a starting script which auto downloads paper by default for selected game version, and configurably, yatopia)

Also, the new version has different version string:
[20:18:41 INFO]: This server is running Yatopia version git-Yatopia-ver/1.16.5-19 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

This was just git-Yatopia-17 before. Including full branch name in the message is good when user uses a non-standard branch (i.e a PR one) but is it also necessary for main branch?

The new version also prints this warning in Java 15:

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

(This message is not printed on Paperclip and when on git-Yatopia-17)

I don't know why and where getCallerClass is used, but, can't you can just use new Throwable().getStackTrace() or Thread.currentThread().getStackTrace()?

@duplexsystem
Copy link
Collaborator

Slower in what regard?

@toinouH
Copy link
Contributor

toinouH commented Feb 2, 2021

I have this warning on java 14 too when I launch the server. For the rest we should wait Ishland :)

@HookWoods
Copy link
Contributor

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
This warning appears after java 9 since the sun package has been deprecated in Java 9 and been removed in Java 10 or java 11 IIRC. So no, this is not a problem. In terms of performance, how many seconds it takes to launch with yatoclip?

@TheDGOfficial
Copy link

TheDGOfficial commented Feb 2, 2021

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
This warning appears after java 9 since the sun package has been deprecated in Java 9 and been removed in Java 10 or java 11 IIRC. So no, this is not a problem. In terms of performance, how many seconds it takes to launch with yatoclip?

How is that not a problem? It uses an internal unsupported Java API which is forbidden in modular Java apps, and will be completely removed in Java 16 (JEP 396: Strongly Encapsulate JDK Internals by Default) for my understanding.

Slower in what regard?

Start-up, both first and other runs.

First run:

java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
Downloading version.json...
Downloading BuildData...
Downloading vanilla jar...
Setting up SpecialSource: cache\1.16.5\BuildData\bin\SpecialSource-2.jar
Applying class mapping...
Invoking SpecialSource with arguments: [map, --only, ., --only, net/minecraft, --auto-lvt, BASIC, --auto-member, SYNTHETIC, -i, <server folder>\cache\1.16.5\Minecraft\1.16.5.jar, -m, <server folder>\cache\1.16.5\BuildData\mappings\bukkit-1.16.5-cl.csrg, -o, <server folder>\cache\1.16.5\Minecraft\1.16.5-cl.jar]

Applying member mapping...
Invoking SpecialSource with arguments: [map, --only, ., --only, net/minecraft, --auto-member, LOGGER, --auto-member, TOKENS, -i, <server folder>\cache\1.16.5\Minecraft\1.16.5-cl.jar, -m, <server folder>\cache\1.16.5\BuildData\mappings\bukkit-1.16.5-members.csrg, -o, <server folder>\cache\1.16.5\Minecraft\1.16.5-m.jar]

Releasing SpecialSource
Applying patches...
Yatoclip server setup completed in 205063.68ms
System Info: Java 15 (Java HotSpot(TM) 64-Bit Server VM 15.0.2+7-27) Host: Windows 10 10.0 (amd64)
Loading libraries, please wait...
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

(205 seconds/3.4 minutes)

Other runs:

Yatoclip server setup completed in 13117.53ms

(13 seconds)

The normal server start-up performance is not affected. (The Done! in X ms message) Not tested the runtime performance.

My machine is not that fast/high-end but it was like maximum 10 seconds even for the first run on Paperclip or git-Yatopia-17.

@duplexsystem
Copy link
Collaborator

duplexsystem commented Feb 2, 2021

How is that not a problem? It uses an internal unsupported Java API which is forbidden in modular Java apps, and will be completely removed in Java 16 (JEP 396: Strongly Encapsulate JDK Internals by Default) for my understanding.

This is only necessary to get it to run on Java 8. Paperclip does a similar thing with different modules. Once 1.17 is out we will be dropping Java 8 for Java 11. So we can remove this hack.

The slow downs with patching are expected. This is a trade off we made in order to get smaller jar files and orders of magnitude fast build times. This should be mitigated by the patched jar cache.

@HookWoods
Copy link
Contributor

How is that not a problem? It uses an internal unsupported Java API which is forbidden in modular Java apps and will be completely removed in Java 16 (JEP 396: Strongly Encapsulate JDK Internals by Default) for my understanding.
Sun package has been removed since java 10 or 11 as I said, so if the package isn't present, it can use it and this system not work on other versions > 1.8 :)

Toffikk added a commit to Toffikk/Yatopia that referenced this pull request May 28, 2021
…Origami)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
3f72a549b Exit with non-zero exit code when killed by watchdog (#5732)
a8d7ad099 Updated Upstream (Bukkit/CraftBukkit) (#5735)
2299159bb Add option to fix items merging through blocks (#5334)
d8c20ddc7 Fix PlayerBucketEmptyEvent result itemstack (#5698)
ceb3762fb Add PufferFishStateChangeEvent (#5606)
cd4defec0 [CI-SKIP] Update version checker to use V2 downloads API (#5728)
b9f2a673d Limit item frame cursors on maps (#5730)
81a537c1f Add PlayerKickEvent causes (#5648)
b7976b956 Add More Lidded Block API (#5707)

Tuinity Changes:
e9c8348 Revert entity ticking chunk map for tracker

Purpur Changes:
aa79fa5c allow disabling offline mode message on an ONLINE MODE proxy
830141ca Bee can work when raining or at night (YatopiaMC#365)
ae6ca468 Updated Upstream (Paper)
d99cc6e8 [ci-skip] Add better issue templates (YatopiaMC#360)
b88aef3a Fix Paper#4748 - Shulkerbox allow oversized stacks
9fec1bae Updated Upstream (Paper)
2aacc766 Update Toothpick to 1.1.0-SNAPSHOT
a08d7470 Configurable anvil cumulative cost (YatopiaMC#352)

Empirecraft Changes:
5305540d Updated Paper
1043bd94 Revert "Call EntityPickupItemEvent for villagers" CB commit
820b9bdf Updated Paper

Origami Changes:
64fba4f Fix importing of classes not working if their directory doesn't exist
Titaniumtown added a commit that referenced this pull request May 29, 2021
…Origami)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
525d0e3d3 fix beacon activate/deactivate events (#5646)
e403d6aaf [Auto] Updated Upstream (CraftBukkit)
6bcd8b57c Updated Upstream (CraftBukkit) (#5742)
501cc9448 Reset villager inventory on cancelled pickup event (#5738)
3f72a549b Exit with non-zero exit code when killed by watchdog (#5732)
a8d7ad099 Updated Upstream (Bukkit/CraftBukkit) (#5735)

Tuinity Changes:
e9c8348 Revert entity ticking chunk map for tracker

Purpur Changes:
687936be Updated Upstream (Paper)
4c2d7e56 Fix advancement triggers on entity death
49a0fb90 Fix oversized shulker box dupe
e92d259e Fix raid captains not giving voluntary exile advancement
a97fdc48 Config to broadcast the death message to the affected player (#363)
9bf8e165 Add burn in daylight API for LivingEntity (#331)
96460068 Fix dupe bug caused by SPIGOT-6452
2618c24f Revert "allow disabling offline mode message on an ONLINE MODE proxy"
aa79fa5c allow disabling offline mode message on an ONLINE MODE proxy
830141ca Bee can work when raining or at night (#365)
ae6ca468 Updated Upstream (Paper)
d99cc6e8 [ci-skip] Add better issue templates (#360)

Empirecraft Changes:
12009c31 Updated Paper
5305540d Updated Paper
1043bd94 Revert "Call EntityPickupItemEvent for villagers" CB commit
820b9bdf Updated Paper

Origami Changes:
64fba4f Fix importing of classes not working if their directory doesn't exist
3b8adab Fix importing of classes not working if their directory doesn't exist
Titaniumtown added a commit that referenced this pull request May 29, 2021
* Updated Upstream and Sidestream(s) (Paper/Purpur/Origami)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
2299159bb Add option to fix items merging through blocks (#5334)
d8c20ddc7 Fix PlayerBucketEmptyEvent result itemstack (#5698)
ceb3762fb Add PufferFishStateChangeEvent (#5606)
cd4defec0 [CI-SKIP] Update version checker to use V2 downloads API (#5728)
b9f2a673d Limit item frame cursors on maps (#5730)
81a537c1f Add PlayerKickEvent causes (#5648)
b7976b956 Add More Lidded Block API (#5707)

Purpur Changes:
b88aef3a Fix Paper#4748 - Shulkerbox allow oversized stacks
9fec1bae Updated Upstream (Paper)
2aacc766 Update Toothpick to 1.1.0-SNAPSHOT
a08d7470 Configurable anvil cumulative cost (#352)

Origami Changes:
3b8adab Fix importing of classes not working if their directory doesn't exist

* Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Empirecraft/Origami)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
525d0e3d3 fix beacon activate/deactivate events (#5646)
e403d6aaf [Auto] Updated Upstream (CraftBukkit)
6bcd8b57c Updated Upstream (CraftBukkit) (#5742)
501cc9448 Reset villager inventory on cancelled pickup event (#5738)
3f72a549b Exit with non-zero exit code when killed by watchdog (#5732)
a8d7ad099 Updated Upstream (Bukkit/CraftBukkit) (#5735)

Tuinity Changes:
e9c8348 Revert entity ticking chunk map for tracker

Purpur Changes:
687936be Updated Upstream (Paper)
4c2d7e56 Fix advancement triggers on entity death
49a0fb90 Fix oversized shulker box dupe
e92d259e Fix raid captains not giving voluntary exile advancement
a97fdc48 Config to broadcast the death message to the affected player (#363)
9bf8e165 Add burn in daylight API for LivingEntity (#331)
96460068 Fix dupe bug caused by SPIGOT-6452
2618c24f Revert "allow disabling offline mode message on an ONLINE MODE proxy"
aa79fa5c allow disabling offline mode message on an ONLINE MODE proxy
830141ca Bee can work when raining or at night (#365)
ae6ca468 Updated Upstream (Paper)
d99cc6e8 [ci-skip] Add better issue templates (#360)

Empirecraft Changes:
12009c31 Updated Paper
5305540d Updated Paper
1043bd94 Revert "Call EntityPickupItemEvent for villagers" CB commit
820b9bdf Updated Paper

Origami Changes:
64fba4f Fix importing of classes not working if their directory doesn't exist
3b8adab Fix importing of classes not working if their directory doesn't exist

* rebuild Patches
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants