Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
include
option to single project config file, and warn if it is…
… used. Summary: In `v12` we have support for `include` array of glob patterns for directories that should be included when searching for relay files. In `rust` we do not have support for these patterns. Currently, if the new compiler is used with the config that has `include` section, we would show a confusing error message: ``` Error searching config: Invalid config file: "/Users/alunyov/relay-examples/todo/package.json": Found key `relay` in package.json, but failed incorrect value: The config file cannot be parsed as a multi-project config file due to: - Error("unknown field `artifactDirectory`, expected one of `name`, `root`, `header`, `codegenCommand`, `sources`, `excludes`, `projects`, `featureFlags`, `savedStateConfig`, `isDevVariableName`", line: 0, column: 0). It also cannot be a single project config file due to: - Error("unknown field `include`, expected one of `schema`, `src`, `artifactDirectory`, `excludes`, `schemaExtensions`, `noFutureProofEnums`, `language`, `customScalars`, `eagerEsModules`, `persistConfig`, `isDevVariableName`, `codegenCommand`, `jsModuleFormat`", line: 0, column: 0). ``` With this change, we will only warn, if the `include` is used. Reviewed By: voideanvalue Differential Revision: D33404317 fbshipit-source-id: 40cd03d40615e83fa58471c643d1eb7b423ff2da
- Loading branch information