Commit 84c5406
committed
fix: make module code hash content-only for portable .module archives
calculate_build_folder_hash baked the absolute build-folder path into the hash, so
a required module's code hash changed when the project moved to another directory or
machine. Consuming a .module archive elsewhere then reported a spurious 'code changes
detected in required module <x>' and forced a re-render.
Hash the code content only (relative paths + file contents). This also drops the
hash_as_folder workaround from the previous commit, since a content-only hash is
already stable across scratch extraction, in-place folders, and locations.
Note: existing archives/metadata must be regenerated (stored hashes include the old
path), and existing in-place multi-module projects will see a one-time 'required
module code changed' on the next render.1 parent 16141f1 commit 84c5406
3 files changed
Lines changed: 25 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
542 | 557 | | |
543 | 558 | | |
544 | 559 | | |
| |||
0 commit comments