-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Place source and build products in OUT_DIR #31
Place source and build products in OUT_DIR #31
Conversation
This has two benefits: * It follows the directions specified in the Cargo docs. ("Build scripts may save any output files in the directory specified in the `OUT_DIR` environment variable. Scripts should not modify any files outside of that directory.") * It makes `cargo clean` work properly. (When build products are placed outside of `OUT_DIR`, `cargo clean` cannot remove them, which can make issues very difficult to debug.)
It was like this in the beginning. It was moved to the location of the extracted package to avoid recompiling OpenBLAS again and again. I’m not sure about this one. It would be nice to gather more feedback from those who use this package. |
The Windows builds of CI are failing. Is that normal?
Yeah, that behavior is nice in most cases. The primary issue is that Keeping the existing behavior would be fine with me if we implemented at least one of the following alternatives:
What do you think of these ideas? |
Yes, it has always been failing on Windows. We never got it to work, as far as I remember. There is this page, which is referenced to from all related crates: https://github.com/blas-lapack-rs/blas-lapack-rs.github.io/wiki It could be mentioned there. Not sure how many people read it, though. Yes, making the shadow folder even more specific should be fine. |
Okay, I've created #32 to make the build directory more specific. |
@jturner314, I was thinking about this and #32, would it not help to introduce a new feature called |
I've figured out the cause of the issue my application had, and I have a workaround for it. My motivation for either #31 or #32 is not for my application, but rather to help prevent other people from having similar problems with debugging that I did. In order to achieve that, the default behavior needs to change somehow. An For context, let me describe the issue I faced in more detail. I know now that the root cause is a bug in either OpenBLAS or
Either of the following would have allowed me to detect the issue much earlier (around the time
On further reflection, I quite like #32. It would have allowed me to detect the issue the fastest, and if I detected the issue soon enough, I may have been able to attribute it directly to the |
Yes, I tend to agree with you that this behavior should be enabled by default via either a default enabling feature or an optional disabling feature. I lean toward the latter. This would mean that the behavior will change for those who depend on this crate; one will have to explicitly opt out (/cc @termoshtt). I don’t necessarily like
Regarding your last point, I understand that you have spent time building the solution in #32, and I appreciate this. I think it might be too early for such measures. Perhaps the new default behavior and functional cleaning will eliminate most of the problems. What do you think? |
Maybe a better name for the feature would be
Don't worry about the work I've put into #32; do what you think is best for the project. Is the primary issue with #32 the additional complexity?
Yes, changing the default behavior to place build products in
However, they'll probably figure out fairly easily that running |
The default behavior is to place build products in `OUT_DIR`. This feature makes it possible to place the build products in the shared `~/.cargo` directory instead.
Thank you for taking the time to respond. Would you be comfortable with just |
This has two benefits:
It follows the directions specified in the Cargo docs. ("Build scripts may save any output files in the directory specified in the
OUT_DIR
environment variable. Scripts should not modify any files outside of that directory.")It makes
cargo clean
work properly. (When build products are placed outside ofOUT_DIR
,cargo clean
cannot remove them, which can make issues very difficult to debug.)