Commit 37ae194
committed
fix(openssl): the xlings sandbox has no os.curdir(), and an unknown call kills install() silently
The diagnostic log added last commit did its job on the first run and contained
exactly one line:
[mcpp] windows install() start; prefix=D:\a\...\compat-x-openssl\3.5.1
i.e. install() died on the very next statement, os.curdir(), with no message
anywhere — not in the job log, not in xlings' error, which stayed a bare
E_INTERNAL. The xlings sandbox exposes a SUBSET of xmake's Lua API, and calling
outside it terminates the hook silently.
That is a nasty failure mode to debug blind, so it is now structural rather
than a one-off fix: os.curdir() is gone, and every remaining call that might
not be in the sandbox (pkginfo.install_file, os.filedirs, path.absolute,
os.files) goes through a `safe` helper that pcalls it and writes 'call failed:
<name> -> <error>' into the log with a fallback value.1 parent fe2a6cf commit 37ae194
1 file changed
Lines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
422 | 421 | | |
423 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
424 | 437 | | |
425 | 438 | | |
426 | 439 | | |
| |||
429 | 442 | | |
430 | 443 | | |
431 | 444 | | |
432 | | - | |
433 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
434 | 448 | | |
435 | 449 | | |
436 | | - | |
437 | | - | |
| 450 | + | |
| 451 | + | |
438 | 452 | | |
439 | 453 | | |
440 | 454 | | |
| |||
480 | 494 | | |
481 | 495 | | |
482 | 496 | | |
483 | | - | |
| 497 | + | |
| 498 | + | |
484 | 499 | | |
485 | 500 | | |
486 | 501 | | |
| |||
0 commit comments