-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
relay-compiler 13.0.1 fails when schema is in __generated__
directory
#3737
Comments
It seems that beyond the I've landed on having a relay.config.json that looks like this:
and invoking the compiler through a script in my package.json
which works locally on OS X, but I'm consistently getting the following on CI
|
Is it possible to create a simple repro for this error somehow with github actions (or otherwise)?
I think we always use |
@alunyov I have a repro which is structured nearly the same. It's how I was originally trying to structure the project, happy to move anything around though if you have ideas. https://github.com/hanford/relay-compiler-ci In the repro the type files generate fine locally, but error in the GH action. I've tried a lot of different approaches for loading my config (both in my private app and in the repro), The bug seems to have to do with non CLI config options and (or) your schema is in a
With the fourth attempt there is a new problem though, not all of the relay config is used. i.e. The subset of CLI args work, but I'm not able to use exclude/customScalars etc, as they're not supported by the CLI and it doesn't seem relay-compiler looks for the config and reliably finds it.
-- There are some branches you can click around in the repro and see the different attempts. Feel free to fork the repo or I can give you push access -- The new compiler is a gamer changer for us, I'm incredibly excited to roll it out @ our company. With the JS compiler it takes ~10 seconds to generate 2.6k TS type files, with the new rust based compiler it takes ~1 second. |
A quick update. The bug here is related to It looks like locally you're using watchman to find files, and everything works "correctly" (it finds the schema files). But on CI the watchman is not installed, and the compiler is using glob file source, and the schema files are in To reproduce this locally run:
I'll take a look at the possible fix. To unblock yourself: 1) do not exclude backend files (temporary), or 2) copy schema file to a different place, outside of excludes. |
Seems to work in my private repo, thanks for the quick unblock @alunyov! |
This was also a problem in previous versions if I'm not mistaken. I have a different directory generated_schema |
Hello, I have a project structured like this:
I've updated the application to work with Relay 13, and everything works locally, but on CircleCI relay-compiler began failing with a pretty cryptic error:
I was able to SSH into the machine and after some trial and error was able to get relay-compiler to work once I copied the schema out of the
__generated__
directory.I wonder if there is something going on with the
__generated__
namespace.We could change our code so this works without moving stuff around, but this might trip others up too
My relay configuration looks like this:
The text was updated successfully, but these errors were encountered: