facebook / facebook/relay

relay-compiler panics when using fragment from base project in multi project setup

Open
#4,471 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to setup a multi project config where one project uses another project as its base, but I'm running into the following error when using a fragment from the base project:

```log
[INFO] querying files to compile...
[INFO] [base-project] compiling...
[INFO] [derived-project] compiling...
thread 'tokio-runtime-worker' panicked at 'Expected location for fragment baseFragment.', crates/relay-typegen/src/write.rs:495:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[INFO] [base-project] compiled documents: 1 reader, 0 normalization, 0 operation text
[ERROR] A thread that the Relay compiler spun up did not shut down gracefully: task 15 panicked
[ERROR] Compilation failed.
[ERROR] Unable to run relay compiler. Error details:
A thread that the Relay compiler spun up did not shut down gracefully: task 15 panicked
```

A reproduction can be found at: https://github.com/tobias-tengler/relay-multiproject-base-issue

This might not be a bug and simply a misconfiguration, but I couldn't find any examples on how to setup it up correctly...

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.