microsoft / microsoft/TypeScript

preserveSymlinks: Changes to target module are not propagated to symlink modules

Open
#30,447 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TypeScript Version: 3.4.0-dev.20190316

Search Terms:

  • preserveSymlinks, symlink, watch, change

Description:

I'm not familiar with how preserveSymlinks works internally, but it appears that symlink modules are not notified of changes to their target path.

My scenario is the following: I'm linking from node_modules/foo to a package that exists outside my project's root directory. When I update foo/src/index.ts, my project is not aware until I restart the TS server.

Related Issues: None.

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

Reproduce the issue with node_modules/foo linked to a package outside the project root, then change foo/src/index.ts while preserveSymlinks is enabled. Investigate TypeScript's watch and symlink-module handling; done means the project observes target-file changes without restarting the TypeScript server. No files or tests are named in the report.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.