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

No output library created when using workspaces #3432

Closed
phil-opp opened this issue Dec 20, 2016 · 3 comments · Fixed by #3478
Closed

No output library created when using workspaces #3432

phil-opp opened this issue Dec 20, 2016 · 3 comments · Fixed by #3478

Comments

@phil-opp
Copy link
Contributor

phil-opp commented Dec 20, 2016

Example Project (git repo):

Cargo.toml:

[package]
authors = ["Philipp Oppermann <dev@phil-opp.com>"]
name = "issue"
version = "0.1.0"

[dependencies.foo]
path = "libs/foo"

[workspace]

libs/foo/Cargo.toml:

[package]
authors = ["Philipp Oppermann <dev@phil-opp.com>"]
name = "foo"
version = "0.1.0"

src/lib.rs and libs/foo/src/lib.rs are both empty.

When I run cargo build, there is no output rlib in target/debug. It works if I remove the workspace from the Cargo.toml.

cargo 0.16.0-nightly (ddb5c32 2016-12-16)
rustc 1.15.0-nightly (8f02c429a 2016-12-15)

phil-opp added a commit to phil-opp/cargo-issue-3432 that referenced this issue Dec 20, 2016
@alexcrichton
Copy link
Member

Interesting! There was a change that tweaked how we managed the output directory structure, but I thought it didn't bring rlibs into place at all. Apparently it happens at least for non-workspace projects!

I suspect there's an extraneous check somewhere that just needs to be updated now that workspaces are in play.

@steveatinfincia
Copy link

I think I've hit this as well, but with a static lib output. It's clearly being built in deps (though with a bunch of numbers after the name of the library), it just never makes it to target/release or target/debug. Is b2ed772 expected to apply there?

@alexcrichton
Copy link
Member

@steveatinfincia I believe so, indeed!

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Jan 5, 2017
I think the condition here was slightly off from before, so invert it subtly to
get what we want, lifting up anything in a workspace or binaries otherwise.

Closes rust-lang#3432
steveatinfincia added a commit to infincia/safedrive-sdk that referenced this issue Jan 10, 2017
bors added a commit that referenced this issue Jan 12, 2017
Lift up workspace rlibs while building

I think the condition here was slightly off from before, so invert it subtly to
get what we want, lifting up anything in a workspace or binaries otherwise.

Closes #3432
steveatinfincia added a commit to infincia/safedrive-sdk that referenced this issue Jan 12, 2017
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

Successfully merging a pull request may close this issue.

3 participants