facebook / facebook/relay

[relay 13] Watchman queries from compiler not supported on latest (homebrew) watchman

Open
#3,674 6 comments 0 reactions 0 assignees View on GitHub
enhancement good first bug
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I updated watchman to the latest homebrew build, which is [v2021.11.15.00](https://github.com/facebook/watchman/releases/tag/v2021.11.15.00) (there has been one new version since then, but its [very difficult](https://github.com/facebook/watchman/commits/main) to know what changed as an outsider) but this query fails:

```
❯ yarn relay-compiler --schema ../.redwood/schema.graphql
yarn run v1.22.17
$ /Users/ortatherox/dev/redwood/relay-redwood-app-example/node_modules/.bin/relay-compiler --schema ../.redwood/schema.graphql
querying files to compile...
[ERROR] Watchman error: The watchman server reported an error: "failed to parse query: must use ["suffix", "suffixstring"]", while executing command: QueryRequest(
"query",
"/Users/ortatherox/dev/redwood/relay-redwood-app-example",
QueryRequestCommon {
glob: None,
glob_noescape: false,
glob_includedotfiles: false,
path: Some(
[
RecursivePath(
"",
),
],
),
suffix: None,
since: None,
relative_root: Some(
"web",
),
expression: Some(
All(
[
FileType(
Regular,
),
Any(
[
All(
[
All(
[
Suffix(
[
"ts",
"tsx",
],
),
DirName(
DirNameTerm {
path: "",
depth: None,
},
),
],
),
Not(
Any(
[
Match(
MatchTerm {
glob: "**/node_modules/**",
wholename: true,
include_dot_files: false,
no_escape: false,
},
),
Match(
MatchTerm {
glob: "**/__mocks__/**",
wholename: true,
include_dot_files: false,
no_escape: false,
},
),
Match(
MatchTerm {
glob: "**/__generated__/**",
wholename: true,
include_dot_files: false,
no_escape: false,
},
),
],
),
),
],
),
Name(
NameTerm {
paths: [
"schema.graphql",
],
wholename: true,
},
),
],
),
],
),
),
fields: [
"name",
"exists",
],
empty_on_fresh_instance: false,
omit_changed_files: false,
fail_if_no_saved_state: false,
case_sensitive: false,
sync_timeout: Default,
dedup_results: false,
lock_timeout: None,
request_id: None,
},
)
[ERROR] Compilation failed.
[ERROR] Watchman error: The watchman server reported an error: "failed to parse query: must use ["suffix", "suffixstring"]", while executing command: QueryRequest(
"query",
"/Users/ortatherox/dev/redwood/relay-redwood-app-example",
QueryRequestCommon {
glob: None,
glob_noescape: false,
glob_includedotfiles: false,
path: Some(
[
RecursivePath(
"",
),
],
),
suffix: None,
since: None,
relative_root: Some(
"web",
),
expression: Some(
All(
[
FileType(
Regular,
),
Any(
[
All(
[
All(
[
Suffix(
[
"ts",
"tsx",
],
),
DirName(
DirNameTerm {
path: "",
depth: None,
},
),
],
),
Not(
Any(
[
Match(
MatchTerm {
glob: "**/node_modules/**",
wholename: true,
include_dot_files: false,
no_escape: false,
},
),
Match(
MatchTerm {
glob: "**/__mocks__/**",
wholename: true,
include_dot_files: false,
no_escape: false,
},
),
Match(
MatchTerm {
glob: "**/__generated__/**",
wholename: true,
include_dot_files: false,
no_escape: false,
},
),
],
),
),
],
),
Name(
NameTerm {
paths: [
"schema.graphql",
],
wholename: true,
},
),
],
),
],
),
),
fields: [
"name",
"exists",
],
empty_on_fresh_instance: false,
omit_changed_files: false,
fail_if_no_saved_state: false,
case_sensitive: false,
sync_timeout: Default,
dedup_results: false,
lock_timeout: None,
request_id: None,
},
)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

```

I wondered if the prefix was `src` or `artifactDirectory` not being set maybe, but:

```sh
yarn relay-compiler --schema ../.redwood/schema.graphql --src ./src --artifactDirectory src/components/__generated__
```

Also fails, if you want a repro: https://github.com/orta/relay-redwood-app-example/tree/relay_13

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.