Skip to content

Rustpkg can't install dependencies that use the src/foo/lib.rs structure #10253

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

Closed
sfackler opened this issue Nov 3, 2013 · 4 comments
Closed

Comments

@sfackler
Copy link
Member

sfackler commented Nov 3, 2013

If I take a project like https://github.com/steveklabnik/hello, I can manually install via rustpkg just fine:

~/test ❯ env TMPDIR=$HOME/tmp rustpkg install github.com/steveklabnik/hello
WARNING: The Rust package manager is experimental and may be unstable
note: Installed package github.com/steveklabnik/hello-0.1 to /home/sfackler/test/.rust

But, if I have a project that depends on hello:

extern mod hello = "github.com/steveklabnik/hello";

fn main() {}

It can't properly pull in the hello dependency:

~/test ❯ env TMPDIR=$HOME/tmp rustpkg install foo
WARNING: The Rust package manager is experimental and may be unstable
task '<unnamed>' failed at 'assertion failed: os::path_exists(&pkg_src.start_dir.join(p))', /home/sfackler/rust/rust/src/librustpkg/lib.rs:516
task '<unnamed>' failed at 'receiving on closed channel', /home/sfackler/rust/rust/src/libstd/rt/comm.rs:198

The full debug output dump is here: http://sprunge.us/SRPU but the gist of it is that it has start_dir = /home/sfackler/test/.rust/build/x86_64-unknown-linux-gnu/src/github.com/steveklabnik/hello-0.1 and JustOne: p = lib.rs, which is missing the src/hello indirection.

A package like https://github.com/sfackler/rust-postgres that has lib.rs in the root directory works just fine.

cc @catamorphism

@sfackler
Copy link
Member Author

sfackler commented Nov 3, 2013

Some packages like https://github.com/brson/rust-sdl fail to work even with rustpkg install with the same error.

@Aatch
Copy link
Contributor

Aatch commented Nov 5, 2013

I encountered a similar (possibly same, at least the same assertion) using rustpkg build to retrieve dependencies.

@catamorphism
Copy link
Contributor

I have a fix for this, well, sort of -- at least it fixes the ICE. I'm just writing a test for it now.

@eholk
Copy link
Contributor

eholk commented Nov 13, 2013

Does rustpkg require Github repos to have the same name as the crate inside? For example, can my rust-papi repo define a papi crate, or does the crate have to be called rust-papi?

flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 7, 2023
Don't pass extra generic arguments in `needless_borrow`

fixes rust-lang#10253

Also switches to using `implements_trait` which does ICE when clippy's debug assertions are enabled.

changelog: None
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

4 participants