Commit 2d7035c
Address code-review findings on the logger fix (F1/F3/F4)
F1 (merge-blocker): logger_loader.build() no longer sets
script.resource_path. Setting it collided on the 2nd+ build of the same
path in one process (editor_reload_plugin / self-update reload cycle),
printing a red "Another resource is loaded from path ..." ERROR and
leaving the script with an empty path anyway — re-introducing the exact
red console text this .gdignore change set out to remove, on ALL engine
versions. Matches game_helper.gd::_handle_eval, which compiles from
source the same way and omits resource_path. Verified: a plugin reload
now produces zero collision errors (was 1 per reload).
F3: plugin.gd::_cleanup_legacy_logger_scripts() deletes the pre-2.5.8
runtime/editor_logger.gd + game_logger.gd (+ .uid) if present. A
self-update from an older version leaves them orphaned (the runner only
writes files in the new ZIP, never prunes), and they'd re-emit the
"Could not find base class Logger" parse errors on Godot 4.4 (self-update
allowed by the gate; Logger absent until 4.5). Existence-guarded, so a
no-op on fresh installs and dev checkouts.
F4: editor_logger.gd resolves McpLogBacktrace via `const preload(...)`
instead of the bare class_name, matching game_logger.gd. Removes the
cold-enable class-registry-timing risk where build() could compile
before the global class table is populated -> reload() fails ->
editor log capture silently never attaches.
Verified: 4.6 import clean (0 parse, 0 collision), reload clean,
editor logger suite 18/18, ruff + pytest green (1088).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 280e82d commit 2d7035c
3 files changed
Lines changed: 44 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
197 | 204 | | |
198 | 205 | | |
199 | 206 | | |
| |||
513 | 520 | | |
514 | 521 | | |
515 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
516 | 541 | | |
517 | 542 | | |
518 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
68 | | - | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
| |||
0 commit comments