-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_loop.py
More file actions
19 lines (15 loc) · 856 Bytes
/
Copy pathtest_loop.py
File metadata and controls
19 lines (15 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import sys
with open('mcp/src/main.rs', 'r') as f:
content = f.read()
log_code = """
for (cand, rel_type) in candidates {
eprintln!("Checking candidate: {}", cand);
if let Ok(cand_sources) = query::retrieval::read_symbol_source_scoped(db, &cand, true, None) {
eprintln!("Got {} sources for candidate: {}", cand_sources.len(), cand);
for cand_src in cand_sources {
eprintln!("Source for {}: {}", cand, cand_src.file_path);"""
content = content.replace(""" for (cand, rel_type) in candidates {
if let Ok(cand_sources) = query::retrieval::read_symbol_source_scoped(db, &cand, true, None) {
for cand_src in cand_sources {""", log_code)
with open('mcp/src/main.rs', 'w') as f:
f.write(content)