Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

feat(perl-lsp): wire dispatch, unity build, and Makefile

Shane McCarron447338bd9bde
diff --git a/Makefile.cbm b/Makefile.cbm
index 72d7f81bf..9d13ee20b 100644
--- a/Makefile.cbm
+++ b/Makefile.cbm
@@ -369,6 +369,8 @@ TEST_CS_LSP_SRCS = tests/test_cs_lsp.c
TEST_CS_LSP_BENCH_SRCS = tests/test_cs_lsp_bench.c
+TEST_PERL_LSP_SRCS = tests/test_perl_lsp.c
+
TEST_SCOPE_SRCS = tests/test_scope.c
TEST_TYPE_REP_SRCS = tests/test_type_rep.c
@@ -471,7 +473,7 @@ TEST_REPRO_SRCS = \
tests/repro/repro_lsp_java_cs.c \
tests/repro/repro_lsp_kt_php_rust.c
-ALL_TEST_SRCS =$(TEST_FOUNDATION_SRCS) $(TEST_EXTRACTION_SRCS) $(TEST_STORE_SRCS) $(TEST_CYPHER_SRCS) $(TEST_MCP_SRCS) $(TEST_DISCOVER_SRCS) $(TEST_GRAPH_BUFFER_SRCS) $(TEST_PIPELINE_SRCS) $(TEST_WATCHER_SRCS) $(TEST_LZ4_SRCS) $(TEST_ZSTD_SRCS) $(TEST_ARTIFACT_SRCS) $(TEST_SQLITE_WRITER_SRCS) $(TEST_GO_LSP_SRCS) $(TEST_C_LSP_SRCS) $(TEST_PHP_LSP_SRCS) $(TEST_CS_LSP_SRCS) $(TEST_CS_LSP_BENCH_SRCS) $(TEST_SCOPE_SRCS) $(TEST_TYPE_REP_SRCS) $(TEST_PY_LSP_SRCS) $(TEST_PY_LSP_BENCH_SRCS) $(TEST_PY_LSP_STRESS_SRCS) $(TEST_PY_LSP_SCALE_SRCS) $(TEST_TS_LSP_SRCS) $(TEST_JAVA_LSP_SRCS) $(TEST_KOTLIN_LSP_SRCS) $(TEST_RUST_LSP_SRCS) $(TEST_TRACES_SRCS) $(TEST_CLI_SRCS) $(TEST_MEM_SRCS) $(TEST_UI_SRCS) $(TEST_HTTPD_SRCS) $(TEST_SECURITY_SRCS) $(TEST_YAML_SRCS) $(TEST_SEMANTIC_SRCS) $(TEST_AST_PROFILE_SRCS) $(TEST_SLAB_ALLOC_SRCS) $(TEST_SIMHASH_SRCS) $(TEST_STACK_OVERFLOW_SRCS) $(TEST_INTEGRATION_SRCS)
+ALL_TEST_SRCS =$(TEST_FOUNDATION_SRCS) $(TEST_EXTRACTION_SRCS) $(TEST_STORE_SRCS) $(TEST_CYPHER_SRCS) $(TEST_MCP_SRCS) $(TEST_DISCOVER_SRCS) $(TEST_GRAPH_BUFFER_SRCS) $(TEST_PIPELINE_SRCS) $(TEST_WATCHER_SRCS) $(TEST_LZ4_SRCS) $(TEST_ZSTD_SRCS) $(TEST_ARTIFACT_SRCS) $(TEST_SQLITE_WRITER_SRCS) $(TEST_GO_LSP_SRCS) $(TEST_C_LSP_SRCS) $(TEST_PHP_LSP_SRCS) $(TEST_CS_LSP_SRCS) $(TEST_CS_LSP_BENCH_SRCS) $(TEST_PERL_LSP_SRCS) $(TEST_SCOPE_SRCS) $(TEST_TYPE_REP_SRCS) $(TEST_PY_LSP_SRCS) $(TEST_PY_LSP_BENCH_SRCS) $(TEST_PY_LSP_STRESS_SRCS) $(TEST_PY_LSP_SCALE_SRCS) $(TEST_TS_LSP_SRCS) $(TEST_JAVA_LSP_SRCS) $(TEST_KOTLIN_LSP_SRCS) $(TEST_RUST_LSP_SRCS) $(TEST_TRACES_SRCS) $(TEST_CLI_SRCS) $(TEST_MEM_SRCS) $(TEST_UI_SRCS) $(TEST_HTTPD_SRCS) $(TEST_SECURITY_SRCS) $(TEST_YAML_SRCS) $(TEST_SEMANTIC_SRCS) $(TEST_AST_PROFILE_SRCS) $(TEST_SLAB_ALLOC_SRCS) $(TEST_SIMHASH_SRCS) $(TEST_STACK_OVERFLOW_SRCS) $(TEST_INTEGRATION_SRCS)
# ── Build directories ────────────────────────────────────────────
diff --git a/internal/cbm/cbm.c b/internal/cbm/cbm.c
index 5e1dd6b05..ec06be7be 100644
--- a/internal/cbm/cbm.c
+++ b/internal/cbm/cbm.c
@@ -6,6 +6,7 @@
#include "lsp/go_lsp.h"
#include "lsp/c_lsp.h"
#include "lsp/php_lsp.h"
+#include "lsp/perl_lsp.h"
#include "lsp/py_lsp.h"
#include "lsp/ts_lsp.h"
#include "lsp/cs_lsp.h"
@@ -957,6 +958,9 @@ static CBMFileResult *cbm_extract_file_impl(const char *source, int source_len,
if (language == CBM_LANG_PHP) {
cbm_run_php_lsp(a, result, source, source_len, root);
}
+ if (language == CBM_LANG_PERL) {
+ cbm_run_perl_lsp(a, result, source, source_len, root);
+ }
if (language == CBM_LANG_PYTHON) {
cbm_run_py_lsp(a, result, source, source_len, root);
}
diff --git a/internal/cbm/lsp_all.c b/internal/cbm/lsp_all.c
index 02f923d14..4ab1f5155 100644
--- a/internal/cbm/lsp_all.c
+++ b/internal/cbm/lsp_all.c
@@ -12,6 +12,8 @@
#include "lsp/generated/cpp_stdlib_data.c"
#include "lsp/php_lsp.c"
#include "lsp/generated/php_stdlib_data.c"
+#include "lsp/perl_lsp.c"
+#include "lsp/generated/perl_stdlib_data.c"
#include "lsp/generated/python_stdlib_data.c"
#include "lsp/py_lsp.c"
#include "lsp/ts_lsp.c"
diff --git a/tests/test_perl_lsp.c b/tests/test_perl_lsp.c
new file mode 100644
index 000000000..e04135252
--- /dev/null
+++ b/tests/test_perl_lsp.c
@@ -0,0 +1,28 @@
+/*
+ * test_perl_lsp.c — Tests for the Perl Light Semantic Pass.
+ *
+ * Placeholder created in plan 22-01 so the Makefile TEST_PERL_LSP_SRCS var
+ * resolves and the build wiring is complete. The real Perl LSP test suite is
+ * authored in plan 22-04; this file currently holds a single passing test.
+ *
+ * TODO(plan 22-04): replace with the full Perl LSP resolution test suite and
+ * register suite_perl_lsp in tests/test_main.c.
+ */
+#include "test_framework.h"
+#include "cbm.h"
+#include "lsp/perl_lsp.h"
+
+/* ── Placeholder ───────────────────────────────────────────────── */
+
+TEST(perllsp_placeholder_skeleton_present) {
+ /* The skeleton entry point exists and is callable via the header. This
+ * test exists only so the suite compiles and links; behavioral coverage
+ * arrives in plan 22-04. */
+ PASS();
+}
+
+/* ── Suite registration ────────────────────────────────────────── */
+
+SUITE(perl_lsp) {
+ RUN_TEST(perllsp_placeholder_skeleton_present);
+}