Skip to content

Commit d8ece6c

Browse files
committed
fix(build): reconcile three call sites after concurrent merges
Two pairs of pull requests merged cleanly but left main unbuildable: - DeusData#2447 added a route_mount parameter to emit_route_registration and handle_route_registration, while DeusData#2464 added a new call to each with the old argument list. The cross-language refused-route helper from DeusData#2464 now takes route_mount and passes it on, and the pass_calls.c call passes it too, as every other call site does. A route minted for a refused binding therefore gets the same Laravel api mount as any other route from that file. - DeusData#2446 added a caller of is_project_db_file, which DeusData#2526 replaced with cbm_is_project_index_db. The new caller uses the replacement, so the owning-project lookup accepts the same file names as every other project scan. Verified: build/c/test-runner and the server binary build again; suites edge_types_probe, mcp, cli and pipeline: 1081 passed, 4 platform skips. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 982621d commit d8ece6c

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎src/mcp/mcp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12093,7 +12093,7 @@ static char *resolve_path_owner(const char *path, char *derived) {
1209312093
cbm_dirent_t *entry;
1209412094
while ((entry = cbm_readdir(d)) != NULL) {
1209512095
mcp_project_record_t record = {0};
12096-
if (!is_project_db_file(entry->name, strlen(entry->name)) ||
12096+
if (!cbm_is_project_index_db(entry->name) ||
1209712097
read_project_record_identity(dir_path, entry->name, 0, &record) != PROJECT_RECORD_OK) {
1209812098
continue;
1209912099
}

‎src/pipeline/pass_calls.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ static int resolve_single_call(cbm_pipeline_ctx_t *ctx, CBMCall *call, const CBM
903903
if (cbm_service_pattern_route_method(call->callee_name) != NULL && call->first_string_arg &&
904904
call->first_string_arg[0] == '/') {
905905
handle_route_registration(ctx, call, source_node, module_qn, imp_keys, imp_vals,
906-
imp_count);
906+
imp_count, route_mount);
907907
return SKIP_ONE;
908908
}
909909
return 0;

‎src/pipeline/pass_parallel.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,7 +2668,8 @@ static void emit_service_edge(cbm_gbuf_t *gbuf, const cbm_gbuf_node_t *source,
26682668
static void emit_xlang_refused_route(cbm_gbuf_t *gbuf, const cbm_gbuf_node_t *source,
26692669
const CBMCall *call, const char *module_qn,
26702670
const cbm_registry_t *registry, const cbm_gbuf_t *main_gbuf,
2671-
const char **imp_keys, const char **imp_vals, int imp_count) {
2671+
const char **imp_keys, const char **imp_vals, int imp_count,
2672+
const char *route_mount) {
26722673
if (cbm_service_pattern_route_method(call->callee_name) == NULL) {
26732674
return;
26742675
}
@@ -2680,7 +2681,7 @@ static void emit_xlang_refused_route(cbm_gbuf_t *gbuf, const cbm_gbuf_node_t *so
26802681
const char *route_path = find_route_path_in_args(call, &handler_ref);
26812682
if (route_path) {
26822683
emit_route_registration(gbuf, source, call, route_path, handler_ref, module_qn, registry,
2683-
main_gbuf, imp_keys, imp_vals, imp_count);
2684+
main_gbuf, imp_keys, imp_vals, imp_count, route_mount);
26842685
}
26852686
}
26862687

@@ -3259,7 +3260,7 @@ static void resolve_file_calls(resolve_ctx_t *rc, resolve_worker_state_t *ws, CB
32593260
* CALLS edge across a language boundary. A route registration
32603261
* behind the refused binding still gets its Route. */
32613262
emit_xlang_refused_route(ws->local_edge_buf, source_node, call, module_qn, rc->registry,
3262-
rc->main_gbuf, imp_keys, imp_vals, imp_count);
3263+
rc->main_gbuf, imp_keys, imp_vals, imp_count, route_mount);
32633264
continue;
32643265
}
32653266
if (!target_node || source_node->id == target_node->id) {

0 commit comments

Comments
 (0)