Skip to content
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

Remove "Could not start watchman" warning #8

Merged
merged 2 commits into from
Sep 7, 2019

Conversation

chancancode
Copy link
Contributor

Historically, watchman was much more important with the use of in-project tmp directory. With that approach, we had a lot more fsevent to filter through.

Now, with the move to using the system's TMPDIR, this problem does not really exist anymore.

On the other hand, since the user most likely did not have watchman already installed on their computer, this "warning" is emitted to every new Ember user when they start the server.

Since it sounded like something is broken, they would then have to spend time understanding the issue (following the link) and installing the package, which is quite involved on anything other than on OS X, all for (at this point, imo) dubious benefits.

I propose that we remove this warning entirely. If we want to, in Ember CLI, we could potentially count the fsevents or profile the filtering code, then emit the warning only when we it becomes an issue. (Probably not worth it though?)

The trigger for this was ember-learn/guides-source#1038, which was caused by ember-learn/super-rentals-tutorial#21.

Since we are now capturing the real output for the tutorial, it also captured the warning (the omission previously was basically a "bug"). It felt like something need to be said about it in the tutorial text, since it looks like something went wrong.

The options are:

  1. Pre-install watchman on the build server, so the warning won't show up
  2. Teach the readers to install watchman
  3. Instruct the readers to ignore the warning

(1) feels like cheating without also doing (2).

(2) is tricky on anything other than OS X (i.e. Linux).

(3) is probably the best option, but that begs the question, why did we have
the warning in the first place then?

After a brief discussion on Discord, it seems like maybe the time for which this warning is necessary has past, and even core team members routinely use Ember without watchman installed, so removing it seemed appropriate.


Since the watchmanSupportsPlatform option is not used by anymore, I have removed it. I would think that it would be used to skip certain checks, but it is not. If that was a mistake I can bring it back.

@NullVoxPopuli
Copy link

Let's remove watchman support and the warning.
I've never used watchman, partially due to never being able to install it on any of my machines, but it hasn't prevented me from having my dev/test server watch for changes. 🤷‍♂️

@rwjblue
Copy link
Member

rwjblue commented Sep 5, 2019

Let's remove watchman support and the warning.

I don't think this makes sense. Removing the warning is quite different from removing support for watchman all together.

@rwjblue
Copy link
Member

rwjblue commented Sep 5, 2019

I'm 👍 on the general goal here, the tests need some tweaks (and I think we'll need to do something about Node 4 in CI).

@chancancode chancancode force-pushed the rm-warning branch 3 times, most recently from 8d15e5d to 6f25039 Compare September 5, 2019 13:28
@chancancode
Copy link
Contributor Author

Couldn't get yarn to work on Node 4, tried a few things including installing a yarn 1.3.2 (maybe the current-gen installer doesn't work on Node 4 or something, dunno).

Since the changes in this PR are probably breaking changes for the purpose of this package anyway, I propose that we just bump major and drop Node 4 support with this.

@chancancode chancancode force-pushed the rm-warning branch 2 times, most recently from 54c0caa to e0be410 Compare September 5, 2019 13:32
@rwjblue
Copy link
Member

rwjblue commented Sep 5, 2019

I propose that we just bump major and drop Node 4 support with this.

Sounds good to me, we should also drop Node 6 (and update package.json engines).

@chancancode chancancode force-pushed the rm-warning branch 5 times, most recently from 12c2b78 to e4a900d Compare September 5, 2019 13:57
Historically, `watchman` was much more important with the use of in-project
`tmp` directory. With that approach, we had a lot more fsevent to filter
through.

Now, with the move to using the system's TMPDIR, this problem does not really
exist anymore.

On the other hand, since the user most likely did not have `watchman` already
installed on their computer, this "warning" is emitted to every new Ember user
when they start the server.

Since it sounded like something is broken, they would then have to spend time
understanding the issue (following the link) and installing the package, which
is quite involved on anything other than on OS X, all for (at this point, imo)
dubious benefits.

I propose that we remove this warning entirely. If we want to, in Ember CLI, we
could potentially count the fsevents or profile the filtering code, then emit
the warning only when we it becomes an issue. (Probably not worth it though?)

The trigger for this was ember-learn/guides-source#1038,
which was caused by ember-learn/super-rentals-tutorial#21.

Since we are now capturing the real output for the tutorial, it also captured
the warning (the omission previously was basically a "bug"). It felt like
_something_ need to be said about it in the tutorial text, since it looks like
something went wrong.

The options are:

1. Pre-install `watchman` on the build server, so the warning won't show up
2. Teach the readers to install `watchman`
3. Instruct the readers to ignore the warning

(1) feels like cheating without also doing (2).

(2) is tricky on anything other than OS X (i.e. Linux).

(3) is probably the best option, but that begs the question, why did we have
the warning in the first place then?

After a brief discussion on Discord, it seems like maybe the time for which
this warning is necessary has past, and even core team members routinely use
Ember without `watchman` installed, so removing it seemed appropriate.

* * *

Since the `watchmanSupportsPlatform` option is not used by anymore, I have
removed it. I would think that it would be used to skip certain checks, but
it is not. If that was a mistake I can bring it back.
@gabrielcsapo
Copy link
Contributor

Just had another interesting error message that wasn't parsed which was

2019-09-05T13:02:03,740: [0x1101f95c0] the owner of /usr/local/var/run/watchman/gcsapo-state is uid 80 and doesn't match your euid 28808

this was related to the permissions of /usr/local/var/run/watchman. It was easily resolvable but I had to debug watchman separately to get this error to manifest.

Copy link
Member

@chrmod chrmod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @rwjblue should we merge and release?

@rwjblue
Copy link
Member

rwjblue commented Sep 7, 2019

@chrmod yes please, it should be a “breaking change” release which would mean a 0.2.0 I believe.

@rwjblue rwjblue merged commit d97cfdf into ember-cli:master Sep 7, 2019
@chancancode chancancode deleted the rm-warning branch September 7, 2019 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants