Strip the current directory from the file paths, because `islec` includes them in the generated source, and this helps us maintain deterministic builds that don't include those local file paths.
(
cur_dir: &std::path::Path,
filename: &std::path::Path,
)
| 139 | /// includes them in the generated source, and this helps us maintain |
| 140 | /// deterministic builds that don't include those local file paths. |
| 141 | fn make_isle_source_path_relative( |
| 142 | cur_dir: &std::path::Path, |
| 143 | filename: &std::path::Path, |
| 144 | ) -> std::path::PathBuf { |
| 145 | if let Ok(suffix) = filename.strip_prefix(&cur_dir) { |
| 146 | suffix.to_path_buf() |
| 147 | } else { |
| 148 | filename.to_path_buf() |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | fn build_isle( |
| 153 | crate_dir: &std::path::Path, |