These are chat archives for wooorm/remark

1st
Sep 2016
Ben Briggs
@ben-eb
Sep 01 2016 16:20
I don't understand the reason for printing this message. I need remark for tests and remark-cli to update the readme https://travis-ci.org/ben-eb/remark-heading-gap/jobs/153974661
Apparently I am "lol stupid user" :/
Ben Briggs
@ben-eb
Sep 01 2016 16:25
I would have preferred remark 6 to remove the CLI instead, this is a bad solution
Ben Briggs
@ben-eb
Sep 01 2016 16:32
By the way, Babel can do this because they made the babel package a no-op in both require and via the CLI
IMO instead of throwing it should check if the remark-cli package is available and spawn it as a sub-process - this would also be an acceptable solution
ref: ben-eb/remark-heading-gap#31
Titus
@wooorm
Sep 01 2016 17:44

I would have preferred remark 6 to remove the CLI instead, this is a bad solution

I want to detect if remark-cli is installed as well and use that if it is there

Haven’t had the time though, but PRs welcome :)
Ben Briggs
@ben-eb
Sep 01 2016 17:56
Just kinda sucks that this release breaks remark and remark-cli interoperability. :/
Titus
@wooorm
Sep 01 2016 17:57
It was the same way before already
Maybe try restarting the build?
Ben Briggs
@ben-eb
Sep 01 2016 17:57
With remark 5?
Titus
@wooorm
Sep 01 2016 17:57
It’s a race condition, which doesn’t happen often, I believe
Nothin changed in these at least :/
Ben Briggs
@ben-eb
Sep 01 2016 18:01
I guess I should not try to run remark on my readme then ;)
Ben Briggs
@ben-eb
Sep 01 2016 18:06
I was wondering why it didn't happen in my other repos. It's cause I don't load remark-cli on those :)
Sorry, I don't really have the time to implement this
I'm going to have to go with the nuclear option, as I would prefer this to getting PRs from greenkeeper on all subsequent remark 6.x releases
Ben Briggs
@ben-eb
Sep 01 2016 19:22
Maybe I'll revisit using remark again once this is worked out
Ben Briggs
@ben-eb
Sep 01 2016 19:52
I've written this issue up but I can't do any more than this I'm afraid. wooorm/remark#206
Ben Briggs
@ben-eb
Sep 01 2016 20:08
I worked out that it isn't a race condition though, it is provable consistently
Titus
@wooorm
Sep 01 2016 21:24
Hi ben, sorry this is affecting you
How are you consistently getting this?
I know it happens sometimes, but I've only seen it two or three times
In fact, all of the plugins I wrote use both the api and the CLI and consistently get perfect results
You've probably done this, but did you rimraf between checks?
Ben Briggs
@ben-eb
Sep 01 2016 21:33
Hm. I tried this now and it seems to work. But it doesn't explain how I got failures on Travis in two consecutive builds
Anyway, even if it is "just" a race condition it seems like poor form to rely on the race condition going the other way ;)
Ben Briggs
@ben-eb
Sep 01 2016 21:46
Also, please don't take my comments as having a go, it's just frustrating how these silly things can have knock-on effects. I blame computers :/
Titus
@wooorm
Sep 01 2016 21:47
:+1: It’s very frustrating, and I’m sorry you’re experiencing, and it’s bad form on my part
The reasoning, was that it was even worse form to not show anything
(and back then I didn’t know it could sometimes fail, and neither did I know to to properly fix it)
Ben Briggs
@ben-eb
Sep 01 2016 21:47
Wouldn't throwing be more appropriate?
Titus
@wooorm
Sep 01 2016 21:48
From where?
Ben Briggs
@ben-eb
Sep 01 2016 21:48
Well, if a CLI is not present then you can't run remark, right :)
Titus
@wooorm
Sep 01 2016 21:48
In that case there isn’t any message. E.g., try install npm install trash -g
It doesn’t show anything other than trash not existing
Ben Briggs
@ben-eb
Sep 01 2016 21:49
Yes, isn't this enough?
That's what I did for the cssnano-cli extraction, I removed the API altogether
Titus
@wooorm
Sep 01 2016 21:50
That was also possible, but I found I’ve installed trash globally like five times not knowing what was up
Titus
@wooorm
Sep 01 2016 21:50
I wanted to prevent that, not knowing it would collide beforehand
Yeah, RTFM, but you don’t normally do that :p
Ben Briggs
@ben-eb
Sep 01 2016 21:51
I make sure to read the changes though :)
Titus
@wooorm
Sep 01 2016 21:52
That’s good and all but from I have experienced most people don‘t do that. Instead, they install a major and if it doesn’t break, they roll with it
Same with remark-lint: people are now running remark-lint, which is now a noop by default, without updating anything other than the version
Ben Briggs
@ben-eb
Sep 01 2016 21:53
Yep, but in that case it would say 'command not found', breaking change :)
Titus
@wooorm
Sep 01 2016 21:53
I’d go with that now, yes, definitely
Ben Briggs
@ben-eb
Sep 01 2016 21:54
So anyway I've just taken the easy way out and trashed remark-cli, this fixes the issue
Not ideal but I can't have everything
Titus
@wooorm
Sep 01 2016 21:54
:/ Sucks, but yes, that’s probably the best
I’m guessing travis is caching something
Ben Briggs
@ben-eb
Sep 01 2016 21:55
Could be, yep
I guess we learned not to have two packages that expose the same cli command in the same package.json :)
Titus
@wooorm
Sep 01 2016 21:58
Nope, it doesn’t work :/