facebook / facebook/relay

Errors with Watchman not being reported

Open
#2,951 1 comment 3 reactions 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

**Bug description**

Attempting to running `relay-compiler` on watch mode with Watchman, I was presented the following message:

```
Zaguinis-MBP:relay-test zaguini$ yarn relay --watch
yarn run v1.15.2
$ relay-compiler --src ./src --schema ./schema.graphql --extensions js jsx --watch
Watchman is required to watch for changes. Running with watch mode disabled.
```

Which was weird since I had Watchman installed. I tried running Watchman and that's what I've got:

```
Zaguinis-MBP:relay-test zaguini$ watchman
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/Cellar/watchman/4.9.0_2/libexec/bin/watchman
Reason: image not found
Abort trap: 6
```

Meaning that there was an error within Watchman. Reinstalling it solved the issue for me.
But that's not enough. I mean, I went through it to investigate, but this error message is not transparent enough. Very silent.

**Expected behavior**

A better error message, something like:

```If you are sure Watchman is installed, try running `watchman` to check for errors```

**Actual behavior**

A not very descriptive error messaging:

```Watchman is required to watch for changes. Running with watch mode disabled.```

Contributor guide

Open the contributing guide

Research direction

Start at the relay-compiler watch-mode entry point and inspect how Watchman startup failures are handled. Run `relay-compiler --watch` with Watchman unavailable or failing, then verify that the underlying Watchman error is reported while the existing fallback behavior remains clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.