Commit Graph

39 Commits

Author SHA1 Message Date
modmuss
c60b456f7e Print info about locked files during configuration or genSources (#1066)
* Print info about locked files during configuration or genSources

* Use release version

* Output adjustments

* Fix build

* Add user back
2024-03-11 21:16:46 +00:00
modmuss
83ab524639 Update MIO to 0.5.0 (#974)
* Update MIO to 0.5.0

* Beta 3 + fix
2023-11-06 19:16:44 +00:00
modmuss50
8abe00a2b1 Fix gen sources without unpick 2023-06-27 20:54:34 +01:00
modmuss50
ffe4d52a12 Improve GenerateSourcesTask error message.
Closes https://github.com/FabricMC/fabric-loom/issues/914
2023-06-27 09:27:59 +01:00
modmuss
4e593fc5ae Rework how unpick and linenumber maps are applied (#907)
This should hopefully vastly improve debugging, and more imporantly not work in a consistant manner, making debugging issues a lot easier.

This commit contains an intergration test that uses a real debugger to check that breakpoints are being fired as expected.
2023-06-16 21:55:04 +01:00
modmuss
6e72125c0f Dont allow gradle to run game/genSources tasks in parallel (#901)
* Dont allow gradle to run game/genSources tasks in parallel

* Fix build
2023-06-13 11:16:56 +01:00
modmuss50
0d2152444f Allow decompilers to set a smaller min heap size. 2023-04-17 15:43:07 +01:00
modmuss50
c16303b9b2 Rewrite Minecraft Library handling. (#857)
This PR rewrites the Minecraft library processing with a more structured and testable set of "library processors". The old code is a mess of special cases and work arounds for various issues on various platforms.

Previously this was only really used on lesser used platforms/versions so wasnt a major issue if things broke, however current shipping Minecraft versions (1.19.4) use an LWJGL version that does not work well on Java versions new than 19. With this change LWJGL is upgraded when using Java 19 or later.

Upgraded libraries are also now only placed on the runtime classpath, this prevents you from using newer library features in your mod.
2023-04-17 00:07:52 +01:00
modmuss50
95a260d923 Test against Gradle 8.1 and 8.2 nightly. (#846) 2023-04-16 17:19:21 +01:00
modmuss50
da4b01427f Move access widener jar processor for new processor API. (#787) 2023-01-10 23:19:21 +00:00
modmuss50
00a3b7ff4e Move Iface injection to new MinecraftJarProcessor API 2022-10-26 12:51:08 +01:00
modmuss50
06074ae73c Start on improved mappings service 2022-10-26 12:47:36 +01:00
modmuss50
24b727c84c More changes 2022-10-04 20:46:46 +01:00
modmuss50
727c396cd9 Add getMappingsFile and getDecompileTask APIs for use by the MC Dev plugin. (#697) 2022-08-07 09:50:22 +01:00
modmuss50
e561cca19a Split mod dependencies into client/common as required. 2022-08-04 08:56:37 +01:00
modmuss50
c4c6de23e3 Rewrite download utils (#681)
- eTag support (It seems Mojang's CDN and our meta/maven do not support this right now)
- Age based caching.
- Sha1 based caching.
- HTTP(S) proxy settings should now be respected.
- The downloader has better awareness of offline mode and refresh deps, cleaning up the calling code a bit.
- Uses the new Java 11 HTTP client, provides async support for downloading multiple files
- Progress handling (TODO needs hooking up to gradle)
- Better compression support. Handled by [Methanol](https://mizosoft.github.io/methanol/) 
- Unit tested with a real web server.
2022-07-25 18:01:11 +01:00
modmuss50
f632dee2df Mod provided javadoc (#627) 2022-04-19 23:30:28 +01:00
modmuss50
9662a8b3de Support injecting interfaces from the mod source. Add a comment to target classes saying what mod is providing an injected interface. (#581) 2022-01-24 15:21:00 +00:00
modmuss50
a712954be2 Depend on decompilerOptions.getClasspath() build tasks.
This doesn't feel necessary but seems to solve it.
2022-01-23 18:26:56 +00:00
modmuss50
a598625146 Make DecompilerOptions.getClasspath() an input for GenerateSourcesTask 2022-01-23 14:53:07 +00:00
modmuss50
b69404ea03 Fix DecompilerOptions.getClasspath()
I was blind and looking for this on the fork options...
2022-01-22 23:30:07 +00:00
modmuss50
240a23f52d Improve decompiler options by moving them away from the task.
Done because the split jar changes required registering the decompiler task after evaluation.
As there may be more than one decompile task, the options are set per decompiler and not per task.
This should also make easier to add new decompilers without requiring a plugin.
2022-01-05 09:49:11 +00:00
modmuss50
4158062ce5 Experimental support for split common and clientonly minecraft jars. (#561)
This lays the ground work for split client and server mod code. With this first phase when enabled loom will generate a clientonly and common minecraft jar. Fabric loader and API will both need changes to support this before it can be used to develop mods.

Phase two of this project will handle splitting mod code into a client and common source set along with spliting any dependencies. 

Mostly fixes #539 by sepreating decompile tasks
2022-01-04 21:19:03 +00:00
modmuss50
53b839b739 Decompiler API improvements:
* Fix decompiler tasks getting registered in afterEvaluate
* Allow decompilers to add file collections to the forked JVM classpath.
* General code cleanup.
2021-12-29 00:10:58 +00:00
modmuss50
5f379e4f42 Make CFR the default decompiler (#527)
* Make CFR the default decompiler
Expose decompiler options

* Remove convention, default value is an empty map.

* Checkstyle..
2021-11-01 13:43:03 +00:00
modmuss50
177264420e Fix misleading error message when decompiling fails. 2021-10-28 18:15:59 +01:00
shedaniel
5c190cc3ef Use NIO instead of ZipUtil (#513)
* Use nio for zip utils

* Make tests work

* Please work

* Fix some issues with tests

* Fix more issues with tests

* NIOZipUtils -> ZipUtils

* Resolve Juuxel's reviews

* Use our own FS utils

* Improve error handling, add loom Pair

* Add Unit tests + fixes

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-10-26 13:08:17 +01:00
modmuss50
0864e0a671 Ensure decompiler worker deamons are stopped after failure. 2021-10-15 22:30:27 +01:00
modmuss50
e2439b7f57 Rewrite GenSources including full support for CFR. (#511)
* Rewrite CFR decompiler interface. Support javadoc

* CFR line numbers and fixes.

* Cleanup and fix

* Use WorkerExecutor to fork, massively cleans up the fernflower code, but does remove the fancy multithreaded logging.

* Use IPC to get logging back from the decompilers.

* Cleanup UnpickJarTask, fix leak in IPCServer

* Used published CFR build

* Handle older windows versions that do not support AF_UNIX.

* Fixes and basic unit test

* Improve memory handling of genSources

* Stop decompile worker JVM
2021-10-11 13:47:16 +01:00
modmuss50
9d9be1b842 Migrate fully to mapping-io + Add comments about transitive access widners to generated sources (#495)
* Add comments about transitive access widners to generated sources

* Migrate fully to mapping io

* Use release version of lorenz-tiny

* Review comment
2021-09-16 15:28:06 +01:00
shedaniel
97a629eef9 File Structure Changes (#462)
* File Structure changes

* Fix checkstyle

* Fix processed jars

* Fix unpick tests

* Resolve reviews

* Fix merge conflicts
2021-08-13 21:02:45 +01:00
shedaniel
75234f4cbd Use Property in LoomGradleExtension & Move task groups to constants (#445)
* Use Property in LoomGradleExtension

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Fix customMinecraftManifest

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Add deprecation messages, let's wait for the tests to run to fix the tests that are using deprecated apis

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Apply license

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Update src/main/java/net/fabricmc/loom/util/DeprecationHelper.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Fix some tests, move mixinRefmapName -> mixin.defaultRefmapName

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Move back to the api

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Fix some tests

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Apply reviews

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Update src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
2021-07-26 20:08:03 +01:00
modmuss50
e439a1b354 Refactor LoomGradleExtension (#431)
* First pass at refactoring the extension

* Fix inital issues.

* Combine some interfaces

* Checkstyle

* Fix years

* Add isShareCaches to api
2021-07-14 00:03:21 +01:00
modmuss50
54fe0909ff Use spotless for header validation, years have been back-filled from git history 2021-07-10 21:50:53 +01:00
modmuss50
1f9f48052b Basic layered mappings with @ParchmentMC support (#413) 2021-06-14 18:39:03 +01:00
modmuss50
759cac2e6b Constant unpicking (#328)
* Start adding constant unpicking

* Update to use unpick cli

* Fix build?

* Fix?

* Fix log spam when unpicking

* Improve unpick tests
2021-03-25 19:03:35 +00:00
modmuss50
03444f26b0 General code cleanup (#313)
* First general cleanup pass

* Review feedback

* Fix build

* Fix tests
2020-12-24 20:58:30 +00:00
modmuss50
3bdccee02e Refactor and fix game/loader library handling (#298)
Update fernflower
2020-12-21 19:34:00 +00:00
Fudge
4bf3d5aebe Allow specifying additional decompilers for generating sources (#213)
* decompilers

* cleanup

* oops

* weird import

* public

* public 2 electric boogalo

* move over fabric specific

* ok

* move to api package
2020-06-01 19:31:32 +01:00