-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Found during dogfooding v2.6.32-dev.4f08082
Severity: Medium
Command: codegraph build . --cfg
Reproduction
# Build without --cfg first
codegraph build . --no-incremental
# Now add --cfg
codegraph build . --cfg --verboseExpected behavior
The --cfg flag should trigger CFG computation even when no files have changed, since this is the first time CFG data is being requested.
Actual behavior
Output: "No changes detected. Graph is up to date." — CFG data is NOT computed. All cfg queries return 0 blocks and 0 edges.
Running build . --cfg --no-incremental works correctly (887 functions analyzed for CFG).
Root cause
The incremental build detects no file changes and short-circuits before the CFG computation phase. The --cfg and --dataflow flags should force re-processing even when the file content hasn't changed, similar to how --no-incremental forces a full rebuild.
Suggested fix
When --cfg or --dataflow is passed and the corresponding data doesn't exist in the DB yet, skip the "no changes detected" early return and proceed with the computation phase.