(project_root: &Path)
| 183 | } |
| 184 | |
| 185 | pub fn default_profile_project_id(project_root: &Path) -> String { |
| 186 | let canonical = project_root |
| 187 | .canonicalize() |
| 188 | .unwrap_or_else(|_| project_root.to_path_buf()); |
| 189 | let mut hasher = Sha256::new(); |
| 190 | hasher.update(canonical.to_string_lossy().as_bytes()); |
| 191 | let digest = hex::encode(hasher.finalize()); |
| 192 | format!("proj_{}", &digest[..16]) |
| 193 | } |
| 194 | |
| 195 | pub fn default_profile_sharded_layout( |
| 196 | project_root: &Path, |
no outgoing calls