Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsc --build mode: tsc crashes in situation involving global module augmentations #25339

Closed
yortus opened this issue Jun 30, 2018 · 1 comment
Closed
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@yortus
Copy link
Contributor

yortus commented Jun 30, 2018

TypeScript Version: 3.0.0-dev.20180630

Search Terms:
build mode, crash

Steps to Reproduce:

Set up @RyanCavanaugh's learn-a sample repo as per his instructions. Now run lerna add @types/multer to add multer typings to all three packages. Run tsc -b packages --forceto confirm it still builds fine. Now add the following line to pkg1/src/index.ts:

export {Options} from 'multer';

Run tsc -b packages --force again.

Expected behavior:

Builds successfully.

Actual behavior:

tsc crashes due to a violated assertion. I looked briefly at the stack trace and assertion, and it seems to be something to do with the global augmentation of the Express namespace.

Related Issues:

Originally reported in #3469 (comment).

@RyanCavanaugh RyanCavanaugh self-assigned this Jul 2, 2018
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Jul 2, 2018
@RyanCavanaugh
Copy link
Member

@sandersn super interesting - this hits the target !== source assert added to mergeSymbolTable despite not having any .js files. Doesn't seem to be related to --build (can repro this under normal tsc -p once upstreams are built)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants