Skip to content

Handle rustpkg build, etc. when given no args properly #8697

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
wants to merge 1 commit into from

Conversation

lilyball
Copy link
Contributor

rustpkg build et al were only checking one directory up to see if it
was in a dir named "src". Ditch that entirely and instead check if the
cwd is descended from any of the workspace paths. Besides being more
intelligent about whether or not something is a workspace, this also
allows for package ids composed of multiple path components.

r? @catamorphism

@lilyball
Copy link
Contributor Author

Tests failed because rustpkg did not consider the temporary dir to be a workspace. The old logic for "no args" used to just check if the parent dir was src, but I changed that logic to specifically check if we're inside a workspace.

If I edit the test to add a .rust directory inside of the temporary directory, this causes the test to pass. I assume that this test modification is appropriate in light of the new behavior.

`rustpkg build` et al were only checking one directory up to see if it
was in a dir named "src". Ditch that entirely and instead check if the
cwd is descended from any of the workspace paths. Besides being more
intelligent about whether or not something is a workspace, this also
allows for package ids composed of multiple path components.
@catamorphism
Copy link
Contributor

Yes, the test modification is okay. Thanks!

bors added a commit that referenced this pull request Aug 28, 2013
`rustpkg build` et al were only checking one directory up to see if it
was in a dir named "src". Ditch that entirely and instead check if the
cwd is descended from any of the workspace paths. Besides being more
intelligent about whether or not something is a workspace, this also
allows for package ids composed of multiple path components.

r? @catamorphism
@bors bors closed this Aug 28, 2013
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