Commit 270be80
fix(pathfinder): remove dead/misleading error handling in platform loaders (#2239)
* fix(pathfinder): remove dead/misleading error handling in platform loaders
Two dead error-handling paths in the dynamic-lib platform loaders:
- load_dl_linux.load_with_system_search guarded abs_path with
'if abs_path is None: raise RuntimeError("No expected symbol ...")'.
abs_path_for_dynamic_library never returns None (it returns a resolved
path or raises OSError), so the branch is unreachable and its message is
factually wrong (it concerns dlinfo path resolution, not symbols). Drop
the dead branch and let the descriptive OSError surface, matching the
deterministic-loader policy of not masking discovery/load failures.
- load_dl_windows.add_dll_directory had 'if not result: pass', a no-op; the
PATH update below already runs unconditionally. Remove the dead branch and
clarify the comment on why PATH is updated regardless.
No behavior change: both removed branches were unreachable or no-ops.
Signed-off-by: Aryan <aryansputta@gmail.com>
* fix(pathfinder): simplify loader review comments
---------
Signed-off-by: Aryan <aryansputta@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>1 parent bdd6447 commit 270be80
2 files changed
Lines changed: 5 additions & 9 deletions
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
| |||
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | | - | |
178 | | - | |
| 175 | + | |
179 | 176 | | |
180 | 177 | | |
181 | 178 | | |
| |||
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
0 commit comments