Commit ed57f56e
ed57f56e9e9eMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 1 file · ~1 modified
Description
fix(parse): skip malformed require_relative lines instead of aborting
resolve_requires in spinel_parse.c bailed out of its scan loop the
moment it hit a malformed require_relative line — an unparseable
quote on either side reached break, abandoning every subsequent
require_relative in the file. Same silent-failure shape as the bug
fixed for the leading scan in c1c1058 and called out as out-of-scope
there. PR #31 caught this; the rest of that PR's changes (per-recursion
visited[] cursor + resolve_requires_impl wrapper, spinel_parse.rb
sibling fix) are now obsolete: the visited-set approach was
superseded by PR #28's global sp_included_paths dedup, and
spinel_parse.rb was dropped entirely in 80bd08d.
Closes #12 follow-up. Lands the slim residue of #31.
Co-Authored-By: Qiaochu Hu [email protected] Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Refs #31
Details
- Commit
- ed57f56e9e9e
- Parent
- f5e973070dfe
spinel_parse.cmodifiedView file
} else if (q2 && q2 < line_end) { quote_char = '\''; start = q2 + 1; } else break; } else { scan_from = pos + 1; continue; } char *end = strchr(start, quote_char); if (!end || end > line_end) break; if (!end || end > line_end) { scan_from = pos + 1; continue; } size_t path_len = end - start; char rel_path[512];