-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add some more context to error messages #884
Conversation
this is targeted towards #273. @schrieveslaach could you install this fork/rev and try if it spits out a more helpful error message. The binary will be available in artifacts soon. bors try --target x86_64-unknown-linux-gnu |
tryBuild succeeded: |
@Emilgardis, here are the results. |
Awesome, thats a huge help, that file seems to be a symlink, so we're basically not handling that correctly |
Ah I definitely didn't handle them for copying the toolchains, it might have slipped through to ordinary files. It should handle copying entire directories which contain symlinks fine, however. |
We should probably also add a warning if generating the symlinks fails, like if this subcommand fails. It should probably say something like Lines 955 to 982 in e583132
|
The issue is this I believe. Lines 247 to 254 in e583132
is_file == false for symlinks |
That should be it. I'll submit a fix shortly. I did that intentionally for toolchains, but I also mistakenly applied that for projects and other mounted volumes. EDIT: Implemented in #885. |
8fcf39a
to
c4afe6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this is implemented, it's good to go:
We should probably also add a warning if generating the symlinks fails, like if this subcommand fails. It should probably say something like
.wrap_err("when creating symlinks to provide consistent host/mount paths");
Lines 955 to 982 in e583132
symlink.push(format!( "prefix=\"{mount_prefix}\" symlink_recurse() {{ for f in \"${{1}}\"/*; do dst=${{f#\"$prefix\"}} if [ -f \"${{dst}}\" ]; then echo \"invalid: got unexpected file at ${{dst}}\" 1>&2 exit 1 elif [ -d \"${{dst}}\" ]; then symlink_recurse \"${{f}}\" else ln -s \"${{f}}\" \"${{dst}}\" fi done }} symlink_recurse \"${{prefix}}\" " )); for (src, dst) in to_symlink { symlink.push(format!("ln -s \"{}\" \"{}\"", src.as_posix()?, dst)); } subcommand(engine, "exec") .arg(&container) .args(&["sh", "-c", &symlink.join("\n")]) .run_and_get_status(msg_info, false) .map_err::<eyre::ErrReport, _>(Into::into)?;
bors r+ |
Build succeeded: |
No description provided.