-
Notifications
You must be signed in to change notification settings - Fork 24
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
Try to determine if --target was passed to Cargo #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks pretty reasonable, just a few comments below.
Out of curiosity, does this solve any real-world problems for you? If so, can you describe that?
Yes, we just changed the |
This checks the output directory for the $CARGO_TARGET_DIR/$TARGET pattern making use of MAIN_SEPARATOR to try to handle Windows. It will also fail if either the path or that pattern are not valid UFT-8, but it will then fall back to the current behavior.
@cuviper Just a friendly ping if there is anything that still needs to be changed here? |
This looks good, although I wish we had a test. I'm not sure how we would do that though -- maybe a workspace crate that can use a real build script, driving with and without I hope you have at least verified that it works in your scenario? |
Yes, I have checked that this allows me to pass
... I will add a unit test by factoring out the detection logic. I think the direct feedback during development is more important than the accuracy of testing an actual Cargo invocation. |
Fair -- I probably lean too often on black-box testing. |
Thanks! I'll go ahead and publish 1.0.1 from here. bors r+ |
This checks the output directory for the
$CARGO_TARGET_DIR/$TARGET
pattern making use ofMAIN_SEPARATOR
to try to handle Windows. It will also fail if either the path or that pattern are not valid UFT-8, but it will then fall back to the current behavior. (So this basically tries to implement #10 (comment).)