microsoft / microsoft/TypeScript

Source files being ignored from symlink directories

Open
#43,415 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Domain: Something Else Help Wanted
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Bug Report

Source files are being ignored from symlink directories when tsconfig.json contains a configuration such as "include": ["**/file", "src/**/*]

🔎 Search Terms

symlink, listFiles

🕗 Version & Regression Information
  • This changed between versions 3.3.4000 and 3.4.1

Works well on 3.3.4000
Doesn't work from 3.4.1
Doesn't work on typescript@next (4.3.0)

💻 Code

Reproduction repository: https://github.com/bvallee-thefork/tsc-bug-symlink

🙁 Actual behavior

With "include": ["src/**/*], src/symlink/file2.ts is correctly listed in the output of: npx tsc -p tsconfig-valid.json --listFiles

With "include": ["**/file", "src/**/*], src/symlink/file2.ts is not listed in the output of: npx tsc -p tsconfig.json --listFiles

🙂 Expected behavior

src/symlink/file2.ts should be listed in the output of npx tsc -p tsconfig.json --listFiles with the following tsconfig:
"include": ["**/file", "src/**/*]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction repository and compare the file lists from npx tsc -p tsconfig-valid.json --listFiles and npx tsc -p tsconfig.json --listFiles. Inspect how the include patterns in tsconfig.json and tsconfig-valid.json handle src/symlink/file2.ts; done means the file is listed with both patterns, including "**/file" and "src/**/*".

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.