#5417·relay

Compiler: `base` accepts one project, so a package that depends on two fragment-defining packages cannot be modeled

Author: rbalicki2Created Sep 18, 2026Updated Sep 22, 2026

ConfigFileProject.base is a single ProjectName or null (relay-compiler-config-schema.json; compiler/crates/relay-config/src/project_config.rs, pub base: Option<ProjectName>). A project can reference documents from exactly one other project.

Three packages, one schema. a imports from b and from c, and renders components from both. b and c do not depend on each other.

javascript
projects: {
  b: shared,
  c: shared,
  a: { ...shared, base: ??? },
}

There is no value for a's base. With base: 'b', an a document cannot spread a c fragment, so a cannot pass a ref to a c component; with base: 'c', the same for b. Making b the base of c (or the reverse) invents a dependency the packages do not have.

We worked around it by mapping all three source directories to one project, which drops the boundary entirely.

Request: let base take a list of project names, with today's semantics per entry (documents referenceable, no artifacts emitted for them, extensions added; names unique across the project and all its bases).

javascript
a: { ...shared, base: ['b', 'c'] },