You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+45-2Lines changed: 45 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,7 +244,50 @@ This pipeline handles:
244
244
245
245
---
246
246
247
-
## 8. Backend Parity and Lua Guardrails
247
+
## 8. Shared Project Config, Patch Targets, and Run Behavior
248
+
249
+
Recent Grill/compiler integration work moved `wurst.build` parsing rules into a tiny shared dependency. Keep compiler behavior aligned with that shared model.
250
+
251
+
### Shared project config dependency
252
+
253
+
*`de.peeeq.wurstscript/build.gradle` depends on `com.github.wurstscript:wurst-project-config`.
254
+
*`de.peeeq.wurstio.languageserver.WurstBuildConfig` is a compiler adapter around the shared model, not a second config DAO.
255
+
* Do not duplicate YAML parsing rules, patch aliases, or script-mode behavior in compiler-only code unless it is truly compiler-specific.
256
+
* Preserve exact `wc3Patch` names for cache invalidation and diagnostics. Broad patch kind is useful for behavior choices, but not enough for hashes.
257
+
258
+
### Patch target rules
259
+
260
+
* Use the shared `Wc3PatchTarget` parser for `wc3Patch`.
261
+
* Patch family boundaries:
262
+
* below `1.29` => pre-1.29 behavior
263
+
*`1.29` through `1.31` => classic
264
+
*`1.32+`, `1.36`, `2.0`, and `Reforged-*` => Reforged
265
+
* Friendly names and jass-history dump names should resolve through shared config. Do not add one-off aliases in compiler code.
266
+
* If jass-history has a broken folder name, fix `wurstscript/jass-history` instead of compensating here.
267
+
268
+
### Build vs run
269
+
270
+
* Build/typecheck should prefer pinned `wc3Patch` from `wurst.build` and should not parse the installed Warcraft executable just to decide target patch data.
271
+
* Config injection should use the pinned project patch when available, not the locally installed game patch.
272
+
* User-facing executable version parsing failures must stay short. Do not print PE parser stack traces unless explicit debug logging is requested.
273
+
* Run/launch is different from build: the selected Warcraft executable controls launch arguments and map placement.
274
+
* When project patch family and selected client family differ, warn and allow the user to choose a different Warcraft III folder.
275
+
* If launch folder selection changes the client, all launch decisions must use that selected `W3InstallationData`, not stale request-level `w3data`.
276
+
* Legacy clients that need install-dir map placement must copy to the selected launch install's `Maps/Test` folder.
277
+
278
+
### Focused tests
279
+
280
+
For config and run-pipeline changes, prefer these focused checks before broader test runs:
281
+
282
+
```
283
+
./gradlew test --tests tests.wurstscript.tests.WurstBuildConfigTests
284
+
./gradlew test --tests tests.wurstscript.tests.MapRequestPatchTargetTests
285
+
./gradlew make_for_userdir
286
+
```
287
+
288
+
---
289
+
290
+
## 9. Backend Parity and Lua Guardrails
248
291
249
292
Recent fixes established additional rules for backend work. Follow these for all future changes:
250
293
@@ -288,7 +331,7 @@ Recent fixes established additional rules for backend work. Follow these for all
288
331
289
332
---
290
333
291
-
## 9. Virtual Slot Binding and Determinism (New Generics + Lua)
334
+
## 10. Virtual Slot Binding and Determinism (New Generics + Lua)
292
335
293
336
Recent regressions showed that virtual-slot binding can silently degrade to base/no-op implementations in generated Lua while still compiling. Follow these rules for all related changes:
0 commit comments