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
{{ message }}
Repository navigation
Commit 3478c0b
Browse filesBrowse the repository at this point in the historyBrowse files
Materialize file names valid on the host; skip and name ones it can't write (#293)
A tracked file with `:` or `\` in its name made every projection of the revision fail with an unnamed "Unsafe repository path". On macOS and Linux those are ordinary file names, so they are now listed, written and read like any other, by the runner and the extractor SDK. On Windows, names it can't create are skipped and named in provenance limitations, as are paths that collide on a case-insensitive file system. A declared source or extractor program that was skipped fails, naming the file. Unsafe paths (traversal, absolute, .git) still fail the revision, and every error from these checks names the path. `projections doctor` warns about tracked paths this platform can't materialize.
Refs #276
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
-**On macOS and Linux, `\` in a path is a file-name character, not a separator** (#293). The extractor SDK used to read `\` as `/` in every path it resolves, including paths in a definition's `inputs`. Now only Windows does. A definition written with `\` separators, such as `"root": "src\\app"`, needs `/` instead.
-**A tracked file whose name has `:` or `\` no longer breaks every projection** (#293, #276, reported by @IgnacioN99). On macOS and Linux, such names are valid file names, so Projections now reads and writes them like any other file. Before, one such file made every projection of the revision fail with `Unsafe repository path`, even projections that never read it. On Windows, names the operating system can't create are skipped and listed in provenance `limitations`, with the reason for each. Paths that collide on a case-insensitive file system are handled the same way. A definition that explicitly requires a skipped name fails and names the file. Paths that would leave the revision's directory or reach `.git` are still refused, and every error from these checks now names the path. `projections doctor` warns about tracked paths this platform can't write. See [Execution](docs/runner/execution.md).
/// every projection of a revision that holds them; names it can't write are
10
+
/// skipped, so projections that read them miss them. Nothing when all can be,
11
+
/// and a warning when they can't be checked.
12
+
pub(super)fnitems(runner:&Runner) -> Vec<Value>{
13
+
let paths = match runner.unmaterializable_paths(){
14
+
Ok(paths) => paths,
15
+
Err(error) => {
16
+
returnvec![item(
17
+
"warn",
18
+
"Repository paths",
19
+
format!("Couldn't check which tracked paths this platform can materialize: {error:#}"),
20
+
)];
21
+
}
22
+
};
23
+
letmut items = Vec::new();
24
+
if !paths.refused.is_empty(){
25
+
items.push(item(
26
+
"fail",
27
+
"Repository paths",
28
+
format!(
29
+
"Projections refuses to materialize {}, so every projection of a revision that tracks {} fails: {}",
30
+
plural(paths.refused.len(),"unsafe path"),
31
+
if paths.refused.len() == 1{"it"} else {"one"},
32
+
named(&paths.refused)
33
+
),
34
+
));
35
+
}
36
+
if !paths.skipped.is_empty(){
37
+
let them = if paths.skipped.len() == 1{"it"}else{"them"};
38
+
items.push(item(
39
+
"warn",
40
+
"Repository paths",
41
+
format!(
42
+
"{} can't be written on this platform, so Projections skips {them}, and a projection that reads {them} misses {them} or fails. Rename {them} to use {them} here: {}",
0 commit comments