mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 15:49:40 +00:00
Added:
- Workspace support (`[workspace]` with deps ordering) - `clean --all` for workspace members Changed: - Project root discovery for `build/run/clean` (searches parent dirs) - Workspace paths are excluded from root source scan - Build output now uses a Cargo-style `Compiling <name> v<version>` line - Build time now reports total time for the whole build stage (workspace included) - Cache hits are silent (no compile line when nothing is rebuilt) - Safer build cache: fingerprints include headers and resolved library files
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::io;
|
||||
use std::path::PathBuf;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn check_dir(dir: Option<&str>) -> io::Result<Vec<String>> {
|
||||
@@ -16,3 +16,16 @@ pub fn check_dir(dir: Option<&str>) -> io::Result<Vec<String>> {
|
||||
|
||||
Ok(items)
|
||||
}
|
||||
|
||||
pub fn find_project_root(start: &Path) -> io::Result<Option<PathBuf>> {
|
||||
let mut current = start.to_path_buf();
|
||||
loop {
|
||||
if current.join("dcr.toml").is_file() {
|
||||
return Ok(Some(current));
|
||||
}
|
||||
if !current.pop() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user