-
Notifications
You must be signed in to change notification settings - Fork 80
Build system fixes for macos (#486) #487
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
Conversation
|
My hope was that with time we could remove My suspicion about the makiness is that it comes from the need/desire to allow toolchain overrides like I'll be happy to see |
On macos, GNU make eagerly avoids calling into the shell, so exposing node commands through $PATH doesn't work half of the time. Also, refactor build system a bit to have less repitition so that the build is easier to maintain. Or at least I think so.
|
I never knew that Anyway, this passes locally now, and on Travis. I'm not really sure if Given we talked about changing our docs, I like that they're now built consistently. In all those factorizations, I left the top-level target untouched, and only called into a shared workflow from there, so that local customizations can be done w/out a global change. I've split this into a few commits to allow for individual decisions. |
stasm
left a comment
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, @Pike. This looks great, I really like how all the tools are listed at the beginning of the file.
I have one comment/suggestion about the mocha-test target below, but it's nothing blocking.
common.mk
Outdated
| # Shared recipes | ||
| .PHONY: mocha-test | ||
|
|
||
| mocha-test: |
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 guess this is a target rather than MOCHA_CMD because you wanted to be able to resolve TEST_REQUIRES lazily? If instead we use a custom test target in fluent-dom (see my other suggestion), that problem would go away.
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's a target 'cause I done this one first, and then the other ones didn't work as targets.
I'm pretty confident that this would work just as well as a CMD. Which is why I kinda looked at it with an angle when pushing.
I think I should just align that.
|
I was torn on whether I should call it If that's just me and the thing I learned new while writing this patch, I'm happy to change that. |
common.mk
Outdated
|
|
||
| MOCHA_CMD =@$(NYC) --reporter=text --reporter=html $(MOCHA) \ | ||
| --recursive --ui tdd \ | ||
| --require esm $(TEST_REQUIRES) \ |
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.
Nit: perhaps call it MOCHA_REQUIRES?
On macos, GNU make eagerly avoids calling into the shell,
so exposing node commands through $PATH doesn't work half of the
time.
I've put two alternatives up in the PR to give some context.
In #486, you mentioned you'd prefer absolute paths. I've done that in
fluent-dedent. I've done it for commands that need it, sotscandeslint. I've done it consistently foreslint, though only one needs it. I've not done it forrollupornyc. Looking at my changes, I'm not fond.I've also thrown out the start of doing
$(ESLINT)influent-dom. Turns out that's actually much more makeier, now that I think about it.@stasm, mind if I go for the latter consistently, and also drop the
$(ROOT)/node_modules/.binfrom$PATH?