Commit Graph

975 Commits

Author SHA1 Message Date
shedaniel
b23636065e Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	build.gradle
#	src/main/java/net/fabricmc/loom/configuration/ide/RunConfig.java
#	src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
#	src/main/java/net/fabricmc/loom/configuration/providers/mappings/MappingsProviderImpl.java
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
#	src/main/java/net/fabricmc/loom/util/FileSystemUtil.java
#	src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java
2021-10-26 21:16:40 +08: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
b7142ae468 Ensure path exists when loading transitive access wideners. 2021-10-25 18:13:28 +01:00
modmuss50
13f4b29d12 Alter TransitiveAccessWidenerJarProcessor to use the same logic used in ModCompileRemapper for resolving mod jars. 2021-10-25 16:34:06 +01:00
modmuss50
61b5cfa733 Improve run config argument handling, should work with spaces a bit better. (#524) 2021-10-24 14:11:01 +01:00
modmuss50
7359dc4e98 Enable META-INF fixer when remapping mods. 2021-10-24 13:05:42 +01:00
modmuss50
a10307464e Add AccessWidenerValidator (#518)
* Add AccessWidenerValidator

* Move to task

* Review feedback
2021-10-23 15:04:22 +01:00
modmuss50
0248bacc16 Forward stdin in AbstractRunTask. Fixes begin unable to run server commands. 2021-10-20 23:12:49 +01:00
modmuss50
2b9907e0f0 Fix mappings not begin on test runtime classpath. 2021-10-16 22:20:27 +01:00
modmuss50
0864e0a671 Ensure decompiler worker deamons are stopped after failure. 2021-10-15 22:30:27 +01:00
modmuss50
d834895ff2 Fix null related issues in CFRObfuscationMapping 2021-10-14 18:14:23 +01:00
modmuss50
c380b36739 Update tiny-remapper and enable "inferNameFromSameLvIndex" to fix issues with decompiling some locals. 2021-10-14 17:04:40 +01:00
shedaniel
f1257e5980 Fix -dev-dev in maven publications
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-13 21:45:26 +08:00
shedaniel
7d05d26eeb Fix #57
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-13 15:15:30 +08:00
shedaniel
72295a8196 Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
Signed-off-by: shedaniel <daniel@shedaniel.me>

# Conflicts:
#	.github/workflows/test.yml
#	src/main/java/net/fabricmc/loom/configuration/RemapConfiguration.java
#	src/main/java/net/fabricmc/loom/configuration/ide/RunConfig.java
#	src/main/java/net/fabricmc/loom/configuration/providers/MinecraftProviderImpl.java
#	src/main/java/net/fabricmc/loom/configuration/providers/minecraft/assets/MinecraftAssetsProvider.java
#	src/main/java/net/fabricmc/loom/decompilers/fernflower/AbstractFernFlowerDecompiler.java
#	src/main/java/net/fabricmc/loom/decompilers/fernflower/ForkingJavaExec.java
#	src/main/java/net/fabricmc/loom/task/GenVsCodeProjectTask.java
#	src/main/java/net/fabricmc/loom/task/GenerateSourcesTask.java
#	src/main/java/net/fabricmc/loom/util/SourceRemapper.java
#	src/test/resources/projects/parchment/build.gradle
2021-10-13 15:13:02 +08:00
modmuss50
d8675e056b Don't allow none reproducible dependencies in layered mappings as it breaks the caching guarantee. 2021-10-12 16:11:44 +01:00
modmuss50
6666b95b54 Fix mod* configurations not being on the test compile/runtime configuration. Closes #488 2021-10-12 13:31:12 +01:00
Juuxel
1c208f99b4 Fix regression in TinyJavadocProvider (#516)
This was param.getName using tiny-mappings-parser before #495. It was writing the method name as the parameter name, which doesn't seem too correct...
2021-10-11 21:31:59 +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
shedaniel
64f10eb47b Turn the tinyMappingsJar dependency into a module dependency
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-09 18:28:40 +08:00
modmuss50
5315d3c5b2 Run tests against Java 17 (#515)
* Run tests against Java 17

* Fix tests on J17
2021-10-09 11:05:38 +01:00
NinjaPhenix
e55763aca2 Use conventions in RemapConfiguration to avoid need for afterEvaluate. (#514) 2021-10-04 21:37:48 +01:00
shedaniel
5582887ee7 Fix java.lang.IllegalArgumentException in ThreadingUtils
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-10-04 02:14:46 +08:00
modmuss50
ce0a3308ff Make Run Config run dir relative to the project and not the root project. Move eclipse launch config files out of the root project. Closes #509 2021-09-30 19:59:46 +01:00
modmuss50
d57f61a38a Add very basic Migrate Mappings test, update lorenz-tiny to fix: https://github.com/FabricMC/fabric-loom/issues/510 2021-09-30 19:26:18 +01:00
modmuss50
782344ac59 Fix crash in JarProcessorManager when the input jar does not have a manifest. 2021-09-29 19:44:26 +01:00
modmuss50
da66abfaef Support 21w39a 2021-09-29 19:33:04 +01:00
shedaniel
d71745f318 Fix checkstyles
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-29 01:30:52 +08:00
shedaniel
4e510be1de Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/configuration/providers/mappings/LayeredMappingsDependency.java
2021-09-29 01:29:17 +08:00
shedaniel
b4fd2e10f5 Fix merge conflicts
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-29 01:28:29 +08:00
modmuss50
f33637aa3c Improve error handling around dep remapping. 2021-09-28 17:22:13 +01:00
modmuss50
80ad300b97 Fix failure when running dependencies task when using layered mappings.
A SelfResolvingDependency has to be a FileCollectionDependency or a ModuleDependency by the looks of it.
2021-09-28 16:34:43 +01:00
shedaniel
c6f51f1dd2 Add -Dloom.refresh=true option (#508)
* Add -Dloom.refresh=true option

* Use Boolean.getBoolean
2021-09-28 12:18:08 +01:00
shedaniel
357656ca3e Fix #54
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-28 19:17:47 +08:00
modmuss50
676a498e0c Fix record signatures based on data provided by mappings. (#507)
Reads "extras/record_signatures.json" from mappings jar, just works with yarn.

Mojmap:

```
mappings loom.layered {
   officialMojangMappings()
   signatureFix("net.fabricmc:yarn:21w38a+build.9:v2")
}
```
2021-09-28 10:38:11 +01:00
shedaniel
9464b5ab07 Fix #49
We are checking if there are methods with the same srg name that are already added, if it is, then we would not fill in these names
This is especially troublesome with methods annotated with @DontObfuscate (e.g. m_129629_), with environments like yarn where methods with the same srg name may not inherit the same names due to parameter mappings and inheritance

This requires further testing!

Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-27 21:47:52 +08:00
shedaniel
fd9694da37 Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/task/RemapJarTask.java
2021-09-25 20:49:45 +08:00
Juuz
4133850e85 Fix another little oopsie 2021-09-25 15:17:51 +03:00
Juuz
b31dbc5eea More work on srg merger 2021-09-25 15:00:39 +03:00
Juuz
9f2cae12d4 Fix an oopsie 2021-09-25 14:35:10 +03:00
Juuz
8c5b4f8db5 Fix comments, locals and arguments missing from SRG merged mappings 2021-09-25 14:34:51 +03:00
shedaniel
c0224d4aa5 Fix checkstyle
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-24 02:29:42 +08:00
shedaniel
9033d1e781 Fix #47, Fix #48
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-24 02:23:42 +08:00
Juuxel
7d2dad6e46 Support a wider range of parameters in FileSpec (#502)
* Support a wider range of parameters in FileSpec

Now supports
- all Providers (incl. Property)
- groovy template string literal (GString)
- Path and gradle FileSystemLocation

* Use the createFromFile overloads directly

* Use charsequence instead of (g)string

* Update src/main/java/net/fabricmc/loom/api/mappings/layered/spec/FileSpec.java
2021-09-22 22:00:41 +01:00
shedaniel
be17a02e90 Use better gradle conventions, and fix #311 (#503)
* Use better gradle conventions, and fix #311

* Fix checkstyle

* Revert some changes

* Use convention

* Remove set classpath
2021-09-22 21:59:51 +01:00
shedaniel
5bf22dd50d Fix debugger spam
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-22 22:52:13 +08:00
shedaniel
a203dab75d Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
# Conflicts:
#	src/main/java/net/fabricmc/loom/extension/MixinExtensionApiImpl.java
2021-09-22 22:39:28 +08:00
shedaniel
621c0e1bc9 Fix srg not merging correctly and fix #42
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-22 22:38:12 +08:00
shedaniel
a50c361223 Make MixinRefmapHelper properly get the mixin configs
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-09-21 02:29:24 +08:00
modmuss50
06e60e5c29 Enable legacy mixin ap by default (#501) 2021-09-20 17:44:08 +01:00