Skip to content

Find workspace root via encompassing member#3549

Closed
matklad wants to merge 5 commits into
rust-lang:masterfrom
matklad:ws-thru-mem
Closed

Find workspace root via encompassing member#3549
matklad wants to merge 5 commits into
rust-lang:masterfrom
matklad:ws-thru-mem

Conversation

@matklad

@matklad matklad commented Jan 16, 2017

Copy link
Copy Markdown
Contributor

Expand #3443 to also find workspace root via member. Also fixes the test from #3443 (comment)

@rust-highfive

Copy link
Copy Markdown

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@matklad matklad changed the title Ws thru mem Find workspace root via encompassing member Jan 17, 2017
@alexcrichton

Copy link
Copy Markdown
Member

@matklad hm this wasn't necessarily the original intention of workspaces, could the case in #3443 just be made an error?

@matklad

matklad commented Jan 17, 2017

Copy link
Copy Markdown
Contributor Author

Could the case in #3443 just be made an error?

Yes, though I think it is orthogonal to the "path_deps geographically outside the worksapce should not be members" issue and this PR. That is, test_path_dependency_under_member test should stay exactly as in this PR, otherwise we won't be testing workspaces at all.

Instead, another simpler test should be added, with something like

# ws/Cargo.toml
   no workspace key, no members key
   [dependencies]
   mem = { path = '../mem' }

# ws/mem/Cargo.toml
  workspace = "gibberish"

Just to clarify: this PR should supersede #3443 because it is #3443 + extended logic for finding members + a fix to test to make sure it actually tests behavior of #3443.

@alexcrichton

Copy link
Copy Markdown
Member

I'm slightly worried about this change though as it's pretty significant (I think). Could we pare this back to just fix the issues at hand and consider extending support for discovering the root through hierarchical Cargo.toml later?

@matklad

matklad commented Jan 18, 2017

Copy link
Copy Markdown
Contributor Author

ould we pare this back to just fix the issues at hand

#3558

@matklad matklad closed this Jan 18, 2017
@matklad matklad deleted the ws-thru-mem branch February 14, 2017 09:59
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 this pull request may close these issues.

3 participants