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

QUESTION: Using relative paths without blog_os workspace #234

Closed
4e554c4c opened this issue Oct 3, 2016 · 4 comments
Closed

QUESTION: Using relative paths without blog_os workspace #234

4e554c4c opened this issue Oct 3, 2016 · 4 comments

Comments

@4e554c4c
Copy link
Contributor

4e554c4c commented Oct 3, 2016

Hello, I am trying to work on crates that are used in blog_os such as multiboot2 which require me to use a relative path (or relative git repository). When I try to compile blog_os I get this error message:

error: workspace member `.../multiboot2-elf64/Cargo.toml` is not hierarchically below the workspace root `.../blog_os/Cargo.toml`

Is there any way to have a dependancy as a relative path without having it in the blog_os workspace?

@phil-opp
Copy link
Owner

phil-opp commented Oct 3, 2016

Hmm, good question… The RFC says:

a crate which specifies [workspace] without a members key will transitively crawl path dependencies to fill in this key. This way all path dependencies (and recursively their own path dependencies) will inherently become the default value for workspace.members.

I don't think that this is a good default. A better default might be “all path dependencies below the workspace root”. I would recommend to open an issue at rust-lang/cargo.

Possible workarounds (untested):

  • specify the workspace members explicitely:
[workspace]
members = ["crate1", "crate2", "crate3"]

@4e554c4c
Copy link
Contributor Author

4e554c4c commented Oct 3, 2016

Possible workaround number 1 does not work, I have tried it before opening this issue.

Possible workaround number 2 works perfectly, thank you for finding this.

@4e554c4c 4e554c4c closed this as completed Oct 3, 2016
@phil-opp
Copy link
Owner

phil-opp commented Oct 3, 2016

Possible workaround number 2 works perfectly,

Great!

Possible workaround number 1 does not work

Sounds like a bug to me. Did you open a cargo issue?

@4e554c4c
Copy link
Contributor Author

4e554c4c commented Oct 4, 2016

@phil-opp The relavent issue is rust-lang/cargo#3156 if you did not get a notification from me opening it

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

2 participants