-
Notifications
You must be signed in to change notification settings - Fork 77
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
install-deps is far too brittle to use set -e #85
Comments
On Ubuntu, the $ ls OpenBLAS/
ls: cannot access OpenBLAS/: No such file or directory
$ rm -rf OpenBLAS
$ echo $?
0 |
You're totally right and the behavior is backed by POSIX. Not sure what happened when I tested this last night and I can't repro now. Sorry for the knee-jerk finger-pointing. :( Regarding my philosophical section, I still feel those concerns have merit. Going back to tests, I think it'd be good if there were some semi-consistent set of tests to be run. For example, we can run one-off tests on Ubuntu, but we have more platforms than that. For example, I'm pretty sure the script will fail on OS X machines that don't have homebrew gnuplot pre-installed [2,3]. [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_25 |
@lukeyeager @mcsaucy you're right. i'm still a bit too uneasy about set -e tbh. should i just revert it? |
Your call, but I'd vote to leave the
I like that idea. It'd be pretty easy to throw this repo up on TravisCI. I'm already doing it here: https://github.com/NVIDIA/DIGITS/blob/v3.1.0/scripts/travis/install-torch.sh Seems like we might be able to run it on multiple OS's too? https://docs.travis-ci.com/user/multi-os/ # something like this?
matrix:
include:
- os: linux
dist: precise
- os: linux
dist: trusty
- os: osx |
64430c3 introduced a neat regression. If a user doesn't have a file/directory named
/tmp/OpenBLAS
, we will reliably fail to build OpenBLAS due to a failure torm
at https://github.com/torch/ezinstall/blob/master/install-deps#L12.7fd56ce is just an awful hack around this behavior to keep the whole script from bailing. Basically, if anyone new tries to use
install-deps
, they'll never build OpenBLAS.As a more philosophical statement, silent failure is soooo user-unfriendly. The script is still kinda janky and silent failure makes it really hard to troubleshoot. As an alternative, you could make a function that runs a command, checks the exit code, and fails with a useful error message (if you use
BASH_LINENO
, you can even get line numbers) if non-zero.... As a side note, are there any tests performed for these changes?
Let me know if you have any questions,
-J
The text was updated successfully, but these errors were encountered: