You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems Watchman does not interpret paths with ./ in the same what that our checks for the existence of the file does. The result is that our initial validation ensuring we have a schema file passes, but when we initialize the project, no schema file is discovered by Watchman and thus when the compiler goes to look up the schema it panics.
I haven't been able to locate exactly the specification for what type of path Watchman expects, but I think we need to either find a way to correctly transform arbitrary paths into that format, or add validation which rejects configs which are not already in that format.
This is potentially a pretty big footgun for adopters of Relay. I myself hit it trying to setup a small project to repro an unrelated issue.
The invalid watchman file paths get constructed here:
It seems Watchman does not interpret paths with
./
in the same what that our checks for the existence of the file does. The result is that our initial validation ensuring we have a schema file passes, but when we initialize the project, no schema file is discovered by Watchman and thus when the compiler goes to look up the schema it panics.I haven't been able to locate exactly the specification for what type of path Watchman expects, but I think we need to either find a way to correctly transform arbitrary paths into that format, or add validation which rejects configs which are not already in that format.
This is potentially a pretty big footgun for adopters of Relay. I myself hit it trying to setup a small project to repro an unrelated issue.
The invalid watchman file paths get constructed here:
relay/compiler/crates/relay-compiler/src/file_source/watchman_query_builder.rs
Line 56 in 9b90142
Validating that the schema file exists is done here:
relay/compiler/crates/relay-compiler/src/config.rs
Lines 588 to 599 in 9b90142
The text was updated successfully, but these errors were encountered: