Skip to content

Incorrect order with project references, extends tsconfig.json and yarn workspaces #29643

@sgronblo

Description

@sgronblo

TypeScript Version: 3.4.0-dev.20190129

Search Terms:

project references order

Code

I made a small PoC here: https://github.com/sgronblo/tsc-build-order-failure

Run yarn install and then yarn build to see the build failure.

Expected behavior:

tsc --build figures out that the client project depends on the core project and builds core before client/src. Even though the project "references" section of the top level "meta" tsconfig.json file happens to list client/src before core. There should be a dependency relationship between client and core because client/src/tsconfig.json extends ../tsconfig.json which defines the reference.

Actual behavior:

tsc just tries to build the projects in the order they are listed in the top level "references" section. When it tries to build client, core has not yet been built, which results in a build error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions