Follow-up to #2141 / #2157 (which resolves calls into sourced-file functions). Two coverage gaps remain, both verified during review of #2157. Neither is a regression; each is a miss, not a fabrication.
-
Extensionless shebang scripts. _SHEBANG_DISPATCH routes #!/usr/bin/env bash extensionless files to extract_bash, but the source-resolution filter selects bash results by suffix (p.suffix in (".sh", ".bash")). A sourced extensionless lib gets its functions indexed but calls into it never resolve.
- Fix direction: select bash results by shape (a node whose
metadata.language == "bash") instead of by suffix.
- Test: extensionless
mylib with a bash shebang, sourced by a.sh; assert the calls edge into mylib's function.
-
Bare source lib.sh (no ./ prefix). Only the raw.startswith((".", "/")) branch records bash_sources; a bare name falls through to the imports fallback and never resolves, even though the file usually sits next to the script.
- Fix direction: in the else branch, if
(path.parent / raw).is_file(), also append a bash_sources entry. Low priority (bash resolves bare names via $PATH at runtime).
Transitive sources (a→b→c, a calls c's function) are intentionally left unresolved (conservative).
Follow-up to #2141 / #2157 (which resolves calls into
sourced-file functions). Two coverage gaps remain, both verified during review of #2157. Neither is a regression; each is a miss, not a fabrication.Extensionless shebang scripts.
_SHEBANG_DISPATCHroutes#!/usr/bin/env bashextensionless files toextract_bash, but the source-resolution filter selects bash results by suffix (p.suffix in (".sh", ".bash")). A sourced extensionless lib gets its functions indexed but calls into it never resolve.metadata.language == "bash") instead of by suffix.mylibwith a bash shebang, sourced bya.sh; assert thecallsedge intomylib's function.Bare
source lib.sh(no./prefix). Only theraw.startswith((".", "/"))branch recordsbash_sources; a bare name falls through to theimportsfallback and never resolves, even though the file usually sits next to the script.(path.parent / raw).is_file(), also append abash_sourcesentry. Low priority (bash resolves bare names via$PATHat runtime).Transitive sources (a→b→c, a calls c's function) are intentionally left unresolved (conservative).