Commit 8f4b45a8
8f4b45a87c9fMerged
Sam Ruby <[email protected]> · 6 months ago · 3 files · +1 added · ~2 modified
Description
chore(rbs-seed): wire extractor into make all, silent --rbs no-op, doc
Three non-blocker suggestions from matz on issue #7:
- Makefile: include spinel_rbs_extract in
make allwhen vendor/rbs is present (viamake deps); otherwise the target is silently omitted so a missing vendor dir doesn't break the standard build. - spinel wrapper:
--rbs DIRis a silent no-op when DIR is absent, empty, or when the extractor binary hasn't been built. Real failures during extraction still warn to stderr. - spinel_rbs_extract.md: subset / dropped-cases reference next to the extractor source, covering the supported type vocabulary, the method-signature shapes accepted, and the cases dropped (multi-overload, generics, mixin ancestry deferred).
Verified: 536/536 tests pass; optcarrot checksum 59662; experiments/rbs
Box harness still flips Box#relabel param from int → string under
--rbs; --rbs /tmp/does-not-exist and --rbs <empty-dir> produce no
stderr output and compile normally.
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Details
- Commit
- 8f4b45a87c9f
- Parent
- 9bdc3cc2cdcd
MakefilemodifiedView file
@@ -138,11 +138,17 @@
138138
139139
.PHONY: all parse bootstrap codegen rbs_extract test retest clean-test-results regen-expected bench optcarrot clean install uninstall deps140140
141-
# Note: rbs_extract is intentionally excluded from `all` -- it's only142-
# needed when users compile with `spinel --rbs DIR`, and requires143-
# `make deps` to have fetched vendor/rbs first. Build it on demand144-
# with `make rbs_extract`.145-
all: parse regexp spinel_analyze$(EXE) spinel_codegen$(EXE)141+
# `make all` includes spinel_rbs_extract when vendor/rbs has been142+
# fetched (via `make deps`). Without vendor/rbs the extractor is143+
# silently omitted -- spinel still works; `spinel --rbs DIR` then144+
# becomes a no-op (warns and proceeds without seeds).145+
ifneq ($(wildcard $(RBS_INC)/rbs/parser.h),)146+
RBS_EXTRACT_TARGET = spinel_rbs_extract$(EXE)147+
else148+
RBS_EXTRACT_TARGET =149+
endif150+
151+
all: parse regexp spinel_analyze$(EXE) spinel_codegen$(EXE) $(RBS_EXTRACT_TARGET)146152
147153
# ---- Dependencies ----148154
# Clone Prism into vendor/prism at the pinned version. Run this oncespinelmodifiedView file
Loading diff…
spinel_rbs_extract.mdaddedView file
Loading diff…