Repository navigation
fix(kuzu): build-system and datasource graphs never wrote on embedded backends - #1644
Merged
Merged
Conversation
…fallback and uid-only MERGE rewrites - GradleModule/MavenModule/ExternalLibrary node tables and MODULE_DEPENDS_ON/ USES_LIBRARY/CHILD_MODULE rel tables were never declared on the embedded backends, so the whole Gradle/Maven build graph binder-errored (#1603). - DbColumn and RedisKeyPattern used composite PRIMARY KEYs, which Kuzu cannot parse: the tables never existed and every datasource ingest failed. They are now keyed on a synthesized uid; DbTable is keyed on fqn (the writer's merge key) with an empty-legacy-table migration. - The UNWIND per-row fallback left the bare row variable dangling in 'WITH node, row' clauses, binder-erroring and silently dropping every row of any node+edge combo query (datasources, gradle/maven external libs). - The uid-only MERGE rewrite dropped displaced pattern properties, leaving key columns NULL for labels whose follow-up SET does not repeat them; they are now re-applied with an injected SET. - gradle.py: accept the Kotlin DSL form implementation(project(":x")) in inter-module deps — the whitespace-only pattern left MODULE_DEPENDS_ON empty on Kotlin-DSL Android projects (#1603). Includes real-Kuzu regression tests for all of the above.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ |
| # reference binder-errors and the row is silently | ||
| # dropped. Scrub it from WITH clauses. | ||
| loop_query = re.sub( | ||
| rf'(WITH\s+[^\n]*?),\s*{row_var}\b(?!\.)', r'\1', loop_query |
| rf'(WITH\s+[^\n]*?),\s*{row_var}\b(?!\.)', r'\1', loop_query | ||
| ) | ||
| loop_query = re.sub( | ||
| rf'WITH\s+{row_var}\s*,\s*', 'WITH ', loop_query |
| rf'WITH\s+{row_var}\s*,\s*', 'WITH ', loop_query | ||
| ) | ||
| loop_query = re.sub( | ||
| rf'WITH\s+{row_var}\b(?!\.)\s*\n', 'WITH 1 AS _row_scrubbed\n', loop_query |
Contributor
🔍 PR Code Graph Analysisfix(kuzu): build-system and datasource graphs never wrote on embedded backends (#1644) 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Found by direct feature exercise against a real KùzuDB after the day's merge queue — none of it is reachable from the mocked unit paths, which is why it survived so long.
GradleModule,MavenModuleandExternalLibrarynode tables — andMODULE_DEPENDS_ON/USES_LIBRARY/CHILD_MODULErel tables — were never declared in the Kùzu schema, sowrite_gradle_build_graphbinder-errored on the first write. This is the missing write-side half of bug(gradle):MODULE_DEPENDS_ONis empty on multi-module Android projects;settings.gradlenever parsed #1603.DbColumnandRedisKeyPatterndeclared compositePRIMARY KEY (a, b), which Kùzu cannot parse — theCREATE NODE TABLEfailed at every startup, taking theSTORED_IN/HAS_COLUMNrel tables down with it. Both are now keyed on a synthesized uid (uid_map, bundle_PK_MAP/_UID_PARTSupdated to match).DbTableis now keyed onfqn— the key the writer actually merges on (namecollides across datasources) — with a drop-empty-legacy-table migration.UNWINDbut left the bare row variable inWITH tbl, tclauses; the dangling reference binder-errors and the row is skipped withcontinue. Every datasource and gradle/maven external-lib write goes through this shape.MERGE (m:MavenModule {group_id: …, artifact_id: …})becameMERGE (m {uid: …}), and since the follow-upSETdoesn't repeat the key fields,group_id/artifact_idstayed NULL — so the CHILD_MODULE/MODULE_DEPENDS_ON MATCHes byartifact_idfound nothing. Displaced properties are now re-applied with an injected SET.gradle.py): the pattern required whitespace beforeproject(, soimplementation(project(":core:network"))produced nothing — the remaining open half of bug(gradle):MODULE_DEPENDS_ONis empty on multi-module Android projects;settings.gradlenever parsed #1603's headline symptom.Verification
cgc index+ analyze commands) on a mixed py/js project.Fixes #1603