Skip to content

Include paths evaluate to no files when tsconfig.json is in a sandbox (regression in 5.5)Β #59036

Closed as not planned
@alexeagle

Description

@alexeagle

πŸ”Ž Search Terms

symlink tsconfig includes

πŸ•— Version & Regression Information

  • This changed between versions 5.4.5 and 5.5.2

⏯ Playground Link

No response

πŸ’» Code

No response

πŸ™ Actual behavior

Under Bazel, builds are made more hermetic by creating a dedicated folder (an "execroot") and symlinking files into it.

Starting in TS 5.5, we see the following minimal reproduction:

% npm init -y
% npm install [email protected]
% echo "export const a = 1;" > index.ts
% echo "{}" > tsconfig.json
% mkdir execroot
% cd execroot
execroot % ln -s ../index.ts . 
execroot % ln -s ../tsconfig.json .
execroot % ../node_modules/.bin/tsc -p tsconfig.json --outDir .
error TS18003: No inputs were found in config file '/Users/alexeagle/repros/ts55/execroot/tsconfig.json'. 
Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["/Users/alexeagle/repros/ts55/execroot"]'.


Found 1 error.

Note that if --outDir . is removed, then this command instead succeeds and writes index.js.

This red PR to Bazel's TypeScript rules demonstrates the problem in the context of running the bazel tool: aspect-build/rules_ts#643

πŸ™‚ Expected behavior

In the prior TypeScript release this was working.

Additional information about the issue

#58042 seems like a likely explanation as it touched the resolution logic for locating files to be in the program, fyi @sheetalkamat

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions