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
refactor(SideCar): Robust runtime path resolution for workspace builds
The previous implementation of `GetBaseSidecarDirectory` relied on a hardcoded directory traversal depth (3 levels up), which failed to locate the project root when the SideCar binary was built within the Land monorepo's workspace target structure (e.g., `.../Target/release/SideCar`).
This commit refactors the discovery logic into a tree-walking algorithm that intelligently identifies the SideCar root regardless of build configuration. It verifies the root using three heuristics:
1. The presence of the `Source/Library.rs` entry point.
2. Parsing `Cargo.toml` to confirm `package.name` is "SideCar".
3. Detecting the monorepo-specific `Element/SideCar` directory structure.
Changes include:
- Added `toml` to `Cargo.toml` dependencies for manifest parsing.
- Implemented the loop-based search strategy in `Source/Download.rs`.
- Added `use toml;` import.
This ensures the SideCar manager can reliably resolve asset paths for both standalone builds and those integrated into the Land monorepo CI/CD pipeline.
0 commit comments