You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: skip native build orchestrator for addon ≤3.8.0 and fix path bug (#758)
* fix: skip native build orchestrator for addon ≤3.8.0 and fix path bug
The native build orchestrator in addon 3.8.0 has a path normalization
bug: file_symbols keys use absolute paths but known_files uses relative
paths, causing zero import/call edges. Additionally, the orchestrator
ran even when engine: 'wasm' was explicitly requested.
JS-side fixes (immediate):
- Skip orchestrator when engine version is 3.8.0 (falls back to JS)
- Skip orchestrator when engine is not 'native' (respects engine option)
- Skip orchestrator on forceFullRebuild (version/schema mismatch)
- Add 'No changes detected' logging on native earlyExit
- Add 'Incremental: N changed' logging from native pipeline results
- Write build_meta after native build for cross-engine consistency
Rust-side fix (takes effect in next native addon release):
- Use relative_path() instead of normalize_path() when building
file_symbols map, and update sym.file to relative path
- Add changedCount/removedCount/isFullBuild to BuildPipelineResult
so JS side can emit incremental status logging
* fix: use semver comparison for orchestrator version check
Replace hardcoded `=== '3.8.0'` with `semverCompare(version, '3.8.0') <= 0`
so the check automatically passes for 3.9.0+ without manual updates.
* style: format orchestrator version check on single line
* fix: address review comments on native pipeline guard (#758)
- Fix comment: say "3.8.0" (exact match) instead of misleading "≤3.8.0"
- Log which condition triggered forceJs bypass for easier debugging
- Document why JS overwrites Rust-written codegraph_version in build_meta
* fix: include built_at in native orchestrator setBuildMeta (#758)
The native orchestrator path omitted built_at from setBuildMeta, leaving
the build timestamp stale after native runs. The JS finalize stage
already writes it — match that behavior so codegraph info shows the
correct build time regardless of which engine path ran.
* fix(native): normalize batch key separators for Windows import edge resolution
The Rust build_import_edges function constructs lookup keys as
format!("{}/{}", root_dir, file), mixing backslashes in root_dir with
forward slashes. On Windows, the JS batch map keys use path.join()
which produces all-backslash paths, causing key mismatches and
silently dropping 5 import edges.
Fix:
- Normalize batch map keys to forward slashes (resolve.ts, resolve-imports.ts)
- Normalize lookup keys in getResolved and buildImportEdgesNative
- Normalize root_dir in Rust key construction (edge_builder.rs)
- Skip native import-edge builder for addon 3.8.0 (pre-compiled addon
still has the bug; Rust fix takes effect in 3.8.1+)
* fix: normalize batch key lookups in resolution tests for Windows
Tests that look up resolveImportsBatch results must use
normalizePath(fromFile) to match the normalized keys in the batch map.
0 commit comments