Skip to content
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

rustpkg: error downloading external dependencies. #9482

Closed
brendanzab opened this issue Sep 24, 2013 · 5 comments
Closed

rustpkg: error downloading external dependencies. #9482

brendanzab opened this issue Sep 24, 2013 · 5 comments

Comments

@brendanzab
Copy link
Member

extern mod cgmath = "github.com/bjz/cgmath-rs";
rustpkg build basis
WARNING: The Rust package manager is experimental and may be unstable
error: Couldn't find package github.com/bjz/cgmath-rs, which is needed by basis-0.1, in any of the workspaces in the RUST_PATH (~[std::path::PosixPath{is_absolute: true, components: ~[~"Users", ~"brendan", ~"dev", ~"rust", ~"basis-rs", ~".rust"]}, std::path::PosixPath{is_absolute: true, components: ~[~"Users", ~"brendan", ~"dev", ~"rust", ~"basis-rs"]}])
task <unnamed> failed at 'Unhandled condition: nonexistent_package: (package_id::PkgId{path: std::path::PosixPath{is_absolute: false, components: ~[~"github.com", ~"bjz", ~"cgmath-rs"]}, short_name: ~"cgmath-rs", version: NoVersion}, ~"Dependency not found")', /Users/brendan/dev/rust/rust/src/libstd/condition.rs:131
task <unnamed> failed at 'receiving on closed channel', /Users/brendan/dev/rust/rust/src/libstd/rt/comm.rs:188
@ghost ghost assigned catamorphism Sep 24, 2013
@catamorphism
Copy link
Contributor

@thewonderidiot
Copy link

@catamorphism I just spent a bit of time digging into this after noticing that this problem affected me everywhere except in subdirectories of /tmp.

The problem is the os::rename_file here: https://github.com/mozilla/rust/blob/master/src/librustpkg/package_source.rs#L205

It's calling libc::rename, which is returning -1 and throwing errno 18, cross-device link. So it looks like rustpkg will have to copy and delete instead of rename()ing if using /tmp, or maybe just clone into .rust/src directly. Eridius suggested this in #rust: "perhaps there should be a dir in .rust that it clones in to, e.g. .src (to keep it hidden). It can use a lockfile as well, so subsequent invocations of rustpkg can detect stale half-clones, and tell from the lockfile that their owning rustpkg is dead".

@catamorphism
Copy link
Contributor

I think @thewonderidiot 's hypothesis is likely to be correct, but I have yet to be able to actually reproduce this myself on a Linux machine :-\

Also see: #9871

@berleon
Copy link

berleon commented Oct 28, 2013

@catamorphism I am currently working on adding support for mercurial to rustpkg. Here. Will also look into this issue.

@catamorphism
Copy link
Contributor

Closing as dup of #10253

flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 12, 2023
[`drop_ref`]: don't lint idiomatic in match arm

fixes rust-lang#10122

As established in issue rust-lang#9482, it is idiomatic to use a single `drop()` expression in a match arm to achieve a side-effect of a function while discarding its output. This should also apply to cases where the function returns a reference.

The change to the lint's code was less than 1 line, because all the heavy lifting was done in PR rust-lang#9491.

---

changelog: FP: [`drop_ref`]: No longer lints idiomatic expression in `match` arms
[rust-lang#10142](rust-lang/rust-clippy#10142)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants