[Feature]: acknowledging an expected warning per path — .graphifyignore is the only lever today and it deletes that file nodes and links (273/812 measured)
Symptom
The only supported way to silence a per-file warning is an entry in .graphifyignore, and an ignore entry removes the file from the corpus — so every node and link that file produced disappears from graph.json. For a file that is extracted mostly correctly and merely trips the warning, that is a strictly worse outcome than the warning itself:
warning: 10 file(s) had syntax errors and may be partially extracted: crates/candle-kernels/src/affine.cu (first error at line 32, no symbols extracted), ... crates/candle-kernels/src/conv.cu (first error at line 6, 12 symbol(s) extracted), crates/candle-kernels/src/fill.cu (first error at line 5, 14 symbol(s) extracted) (+5 more)conv.cu yields 12 symbols. Silencing the line for it costs those 12 nodes, and there is no syntax that removes the message while keeping the extraction.
Minimal repro (no CUDA involved)
$ cat src/macros.h
#define MAKE_KERNEL(TYPE, NAME, EXPR) \
void NAME(TYPE x) { \
(void)(EXPR); \
}
$ cat src/code.cpp
#include "macros.h"
MAKE_KERNEL(int, add_i32, x + 1)
MAKE_KERNEL(float, add_f32, x + 1.0f)
int kept_function(int a) { return a + 1; }
$ graphify update .
warning: 1 file(s) had syntax errors and may be partially extracted: src/code.cpp (first error at line 3, 1 symbol(s) extracted)
[graphify watch] Rebuilt: 3 nodes, 2 edges, 1 communitiesextract_cpp returns nodes = [code.cpp, kept_function()] with parse_errors = {"first_error_line": 3, "multiline_error": true}. The file is not a loss: this is the #2551 gate firing because a file-scope macro invocation dissolved into a multi-line ERROR region. Adding src/code.cpp to .graphifyignore to clean the log would delete kept_function() as well.
Measured cost of the ignore entry (real repo)
In crates/candle-kernels/src the same trade-off is 14 CUDA files contributing 273 nodes and 812 links (0.9.67). The warning names 10 of them; 7 extract between 4 and 15 symbols each (cast.cu 5, conv.cu 12, fill.cu 14, indexing.cu 7, reduce.cu 15, sort.cu 4, unary.cu 9). Verified by diffing the canonical node and link sets of graph.json before/after adding the ignore entry: the sets differ by exactly those 273 nodes and 812 links, so the only lever available today deletes real data. A # comment above the entry helps the next human reading the file; it does not help the CI log, and it does not exist for the reader who never opens .graphifyignore.
Related: #3911 (the CUDA-specific report: why these files trip the warning at all).
Ask
A way to acknowledge expected noise for a path without removing it from the corpus. Any of these shapes would work:
- A CLI flag —
--warn-level/--no-syntax-warnings/--quiet-warnings— leaving the counts reachable via--verbose. - A per-path allowlist: a
.graphifyallowfile, or a directive inside.graphifyignore(e.g.!warnings-ok: path/*orhide-warn: path) that mutes the log line for those files while they keep being extracted. - A configuration key (e.g.
[warnings] syntax_errors = "mute:path/*"), whatever fits the existing configuration model.
For our repo the difference is binary: with a suppression that keeps the files, the log is clean and the graph keeps the GPU execution path; without one, we have to choose between a perma-noisy log and 273 missing nodes.
Happy to test a build or open a PR if you point at the intended shape.
Source: Graphify-Labs/graphify