Skip to content

Commit 8bcdfde

Browse files
committed
Fix cache manifest not saving: open MPQ writable in ProjectConfigBuilder
`ProjectConfigBuilder.apply()` opens the target map MPQ to save the updated cache manifest, but passes `readOnly=true` to `getEditor()`. The subsequent `saveManifest()` call tries to insert a file via `mpq.insertFile()`, which calls `JMpqEditor.deleteFile()` internally. JMPQ3 throws `NonWritableChannelException` (with a null message) when the editor is read-only, resulting in: Warning: Could not save manifest to MPQ: null This silently breaks the build caching system introduced in #1096 — every build becomes a full rebuild because the manifest is never persisted. Fix: change `readOnly` from `true` to `false` so the manifest can actually be written.
1 parent 6b6494f commit 8bcdfde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/ProjectConfigBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public static MapRequest.CompilationResult apply(WurstProjectConfigData projectC
9797
// Apply map header (this is cheap, so we always do it)
9898
applyMapHeader(projectConfig, targetMap);
9999

100-
// Update the manifest with new config hash
101-
try (MpqEditor mpq = MpqEditorFactory.getEditor(Optional.of(targetMap), true)) {
100+
// Update the manifest with new config hash (must open writable to insert)
101+
try (MpqEditor mpq = MpqEditorFactory.getEditor(Optional.of(targetMap), false)) {
102102
ImportFile.CacheManifest manifest = ImportFile.getCachedManifest(mpq).orElse(new ImportFile.CacheManifest());
103103
manifest.setMapConfig(configHash);
104104
ImportFile.saveManifest(mpq, manifest);

0 commit comments

Comments
 (0)