Release 0.7.2.3: context manifests and multi-language symbols - #40
Merged
Merged
Conversation
New src_symbols() parses top-level src/*.{c,cc,cpp,h,hpp} with the
bonsaisitter tree-sitter runtime (treesitter.cpp grammar) into function
defs and call relationships, mirroring symbols(). A def is exported when
its name appears in an R registration table (R_CallMethodDef and
friends), i.e. reachable from R via .Call().
blast_radius() gains include = "src" to report C/C++ callers from the
target project's src/.
bonsaisitter goes in Suggests; the treesitter.cpp grammar is reached via
requireNamespace() only until it is published. Projects without src/
return empty indices without needing either package.
Newer tinyrox ignores tags in file-header blocks that are not followed by an object definition, so the import was silently dropped from NAMESPACE on regeneration. Function-level placement survives.
src_symbols() now recursively scans any repository, not just an R package's top-level src/: C (.c/.h), C++ (.cc/.cpp/.cxx/.hh/.hpp), and Python (.py), with a langs argument, per-language grammar dispatch (treesitter.c with treesitter.cpp fallback, treesitter.cpp, treesitter.python), and a lang column in defs/calls. exported now means visible beyond the file/module: non-static in C/C++, no leading underscore in Python. This replaces R_CallMethodDef registration detection, which only made sense for R packages; a dedicated .Call bridge can return as its own feature. New default_src_exclude() lists directory basenames skipped while scanning (node_modules, __pycache__, venv, build, dist, renv); hidden directories are always skipped. Vendored trees can be excluded per call, e.g. exclude = c(default_src_exclude(), "tree-sitter").
default_src_exclude() now folds in default_exclude(), so user directories (Documents, Downloads, Sync, ...) are skipped even when a scan is pointed at a home directory. *.Rcheck directories are always skipped, like hidden directories, regardless of exclude.
Rust (.rs, treesitter.rust grammar): indexes function, struct, enum, and trait items; exported = declared pub. Cargo's target/ joins default_src_exclude(). JavaScript (.js/.mjs/.cjs/.jsx, treesitter.javascript grammar): indexes function and class declarations, methods, and variables bound to arrow functions or function expressions; exported = wrapped in an ES module export statement (CommonJS module.exports is not detected). Per-language call node types move into src_call_spec(). Both grammar packages are unpublished, so they stay out of Suggests and are reached via requireNamespace(), like treesitter.cpp.
Scans every git repository directly under scan_dir, counts commits in the lookback window, and writes a busiest-first markdown summary of active projects to briefs/_heartbeat.md, message()-emitted like briefing(). Ports the cross-repo activity rollup that previously lived only in a private briefing job so any agent can call it. The --since git argument is shQuote()d: it contains a space and system2() does not quote arguments itself.
The count and log primitives behind heartbeat(), promoted to API so downstream tooling (cerebro briefing sources) can compose custom activity reports without carrying their own git plumbing. git_log_since() gains since_date = NULL (no lower bound) and a format argument: "oneline" (default, unchanged) or "iso" (tab-separated ISO-local timestamp, short hash, subject). heartbeat() behavior is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Scope
Publishing to GitHub only; no CRAN submission, normal-library installation, corteza source changes, or active ARC changes. User approved inclusion of the pending multi-language feature and use of the existing drat repository if non-CRAN dependencies cause CI failures. The CI failure was a portability bug, not a dependency failure, so no drat update was needed.