MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / resolve_ref

Function resolve_ref

src/pipeline/doc_links_cs.c:5612–5627  ·  view source on GitHub ↗

A reference in this context. For product code a namespace that only test * code declares does not exist. When the reference came to nothing and such * a namespace was passed over on the way, what it names may be a test * declaration: asked once more the way test code sees it, a name that is * there is test_only_target; one that is not there either keeps the reason * it has without that namesp

Source from the content-addressed store, hash-verified

5610 * there is test_only_target; one that is not there either keeps the reason
5611 * it has without that namespace. */
5612static cs_res_t resolve_ref(const cs_ctx_t *c, const cs_ref_t *r) {
5613 bool passed_over = false;
5614 cs_ctx_t seen = *c;
5615 seen.passed_over = &passed_over;
5616 cs_res_t res = resolve_form(&seen, r);
5617 if (!passed_over || !reason_is_nothing(&res)) {
5618 return res;
5619 }
5620 cs_ctx_t as_test = *c;
5621 as_test.prod = false;
5622 as_test.passed_over = NULL;
5623 cs_res_t there = resolve_form(&as_test, r);
5624 bool nothing = reason_is_nothing(&there) ||
5625 (there.st == CS_UNRES && there.reason == CBM_DOCLINK_REASON_UNPARSEABLE);
5626 return nothing ? res : res_unres(CBM_DOCLINK_REASON_TEST_ONLY);
5627}
5628
5629/* ── Context ─────────────────────────────────────────────────────── */
5630

Callers 1

cs_resolveFunction · 0.85

Calls 3

reason_is_nothingFunction · 0.85
res_unresFunction · 0.85
resolve_formFunction · 0.70

Tested by

no test coverage detected