Include source mapping hash in decompiler cache key (#1414)

* Include source mapping hash in decompiler cache key

Fixes #1410.

* Mark source mappings hash property as optional, improve name
This commit is contained in:
Juuz
2025-10-31 23:38:25 +02:00
committed by GitHub
parent 0e2fc99eb1
commit 4fb75cf336
2 changed files with 29 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2016-2022 FabricMC
* Copyright (c) 2016-2025 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -407,6 +407,13 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
sj.add(unpick.getUnpickCacheKey());
}
SourceMappingsService mappingsService = serviceFactory.get(getMappings());
String mappingsHash = mappingsService.getProcessorHash();
if (mappingsHash != null) {
sj.add(mappingsHash);
}
getLogger().info("Decompile cache data: {}", sj);
return Checksum.of(sj.toString()).sha256().hex();