-
Notifications
You must be signed in to change notification settings - Fork 30k
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
build: ignore empty folders in test-addons-napi #16380
Conversation
The same as nodejs#16031 except for N-API addons. Fixes: nodejs#13521
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.
I had the same issue. I confirmed the PR locally, the test passed! Thank you @addaleax
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.
LGTM with suggestion
@for dirname in test/addons-napi/*/; do \ | ||
if [ ! -f "$$PWD/$${dirname}binding.gyp" ]; then \ | ||
continue; fi ; \ |
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.
Suggestion: it might be cleaner if you change
if [ ! -f "$$PWD/$${dirname}binding.gyp" ]; then \
continue; fi ; \
to
[ ! -f "$$PWD/$${dirname}binding.gyp" ] && continue ; \
Maybe it's just me that find that cleaner though.
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.
I think moving control flow into logical expressions is … hm. 😄
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.
It just wasn't immediately obvious where the end of the if
block was, because the fi
isn't on its own line.
As this already squashes things down, you could go further and do:
if [ ! -f "$$PWD/$${dirname}binding.gyp" ]; then continue; fi ; \
I think moving control flow into logical expressions is … hm. 😄
Unrelated to this PR, but I'd be interested to know what the objection is, I've heard a lot of people say this, but for me [ x ] && y
is just a cleaner way of saying if [ x ]; then y; fi
(for simple y
s). Obviously in a language with nicer if
s, then there's not much gain (e.g. for rust if x { y }
), but in bash it seems more worthwhile.
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.
@gibfahn I really like [ x ] && y
too, but for other things – shell scripts are exceptional in that you can actually make control flow part of the expression, and that just feels pretty odd to me I guess?
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.
LGTM
Landed in 65d2067, thanks Anna! |
The same as #16031 except for N-API addons. PR-URL: #16380 Fixes: #13521 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The same as #16031 except for N-API addons. PR-URL: #16380 Fixes: #13521 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The same as #16031 except for N-API addons. PR-URL: #16380 Fixes: #13521 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The same as #16031 except for N-API addons. PR-URL: #16380 Fixes: #13521 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The same as nodejs/node#16031 except for N-API addons. PR-URL: nodejs/node#16380 Fixes: nodejs/node#13521 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The same as nodejs/node#16031 except for N-API addons. PR-URL: nodejs/node#16380 Fixes: nodejs/node#13521 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The same as nodejs/node#16031 except for N-API addons. PR-URL: nodejs/node#16380 Fixes: nodejs/node#13521 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The same as #16031 except for N-API addons.
Fixes: #13521
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build