Commit 57adcc1
authored
Fix shdeps Lua bootstrap without debug source paths (#27)
Fix shdeps Lua bootstrap loading for embedded Lua hosts that do not
provide
file-backed debug source metadata.
`bootstrap.load()` already knows the selected `lua/shdeps.lua` candidate
path,
so it now loads the chunk with `loadfile()` and passes that path through
chunk
varargs. The public Lua module uses the injected source path for sibling
discovery before falling back to `debug.getinfo`, keeping direct loads
working
as before while avoiding host-specific behavior or global state.
The regression test clears `debug` while loading the real public module
through
bootstrap, covering the no-debug-source-path case.
Testing:
- `checkrun lint lua/shdeps.lua lua/shdeps/bootstrap.lua
tests/shell/lua-bootstrap-test`
- `git diff --check`
- `tests/shell/lua-bootstrap-test` with `lua` backed by `nvim --headless
-l`
- `tests/shell/lua-api-test` with `lua` backed by `nvim --headless -l`
- `tests/shell/install-sh-test`
- `tests/shell/installer-flow-test`
- `tests/shell/release-scripts-test`
- `cargo test --locked`
- `cargo clippy --locked --all-targets -- -D warnings`
- `RUSTDOCFLAGS='-D missing-docs' cargo doc --locked --no-deps`1 parent 19c97a0 commit 57adcc1
3 files changed
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
108 | 120 | | |
109 | 121 | | |
110 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
| |||
0 commit comments