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

ngcc generate inline sourcemaps in .d.ts files and break completely DX #37324

Closed
tonivj5 opened this issue May 28, 2020 · 3 comments
Closed

ngcc generate inline sourcemaps in .d.ts files and break completely DX #37324

tonivj5 opened this issue May 28, 2020 · 3 comments
Labels
area: compiler Issues related to `ngc`, Angular's template compiler state: confirmed type: bug/fix
Milestone

Comments

@tonivj5
Copy link

tonivj5 commented May 28, 2020

🐞 bug report

Affected Package

The issue is caused by package @angular/ALL

Is this a regression?

I think yes, the previous version in which this bug was not present was: I don't know, maybe 8.x.x.

Description

When ngcc run it appends a massive source-map at the end of definition files (.d.ts) in every angular package, and it gets stuck my code editor (vscode). I have to restart vscode to kill the tsserver, and avoid to enter to any angular's file definition.

🔬 Minimal Reproduction

ng new ..., npm run start (to run ngcc) and follow, for example, Component definition to its .d.ts file at @angular/core. VSCode and ng-language-service take a lot of time to process the file and consume a lot of CPU.

🔥 Exception or Error

image

🌍 Your Environment

Angular Version:


Angular CLI: 9.1.6
Node: 13.7.0
OS: linux x64

Angular: 9.1.9
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.1
@angular-devkit/build-angular     0.901.6
@angular-devkit/build-optimizer   0.901.6
@angular-devkit/build-webpack     0.901.6
@angular-devkit/core              8.3.25
@angular-devkit/schematics        8.3.25
@angular/cdk                      9.2.4
@angular/cli                      9.1.6
@ngtools/webpack                  9.1.6
@schematics/angular               9.1.6
@schematics/update                0.901.6
rxjs                              6.5.5
typescript                        3.8.3
webpack                           4.42.0
    
Done in 0.58s.

Anything else relevant?
image

@pkozlowski-opensource pkozlowski-opensource added the area: compiler Issues related to `ngc`, Angular's template compiler label May 28, 2020
@ngbot ngbot bot added this to the needsTriage milestone May 28, 2020
@petebacondarwin
Copy link
Member

Currently ngcc tries to guess whether to add source-mapping inline or as an external file.
It does seem strange that the d.ts files are getting inline source-maps since the originals do not have one...

@tonivj5
Copy link
Author

tonivj5 commented May 28, 2020

As a workaround (meanwhile it's fixed), I'm removing source-maps by hand... but it's a pain 😓

petebacondarwin added a commit to petebacondarwin/angular that referenced this issue May 30, 2020
Inline source-maps in typings files can impact IDE performance
so ngcc should only add such maps if the original typings file
contains inline source-maps.

Fixes angular#37324
matsko pushed a commit that referenced this issue Jun 1, 2020
…ps (#37363)

Inline source-maps in typings files can impact IDE performance
so ngcc should only add such maps if the original typings file
contains inline source-maps.

Fixes #37324

PR Close #37363
@matsko matsko closed this as completed in b45f336 Jun 1, 2020
ngwattcos pushed a commit to ngwattcos/angular that referenced this issue Jun 25, 2020
…ps (angular#37363)

Inline source-maps in typings files can impact IDE performance
so ngcc should only add such maps if the original typings file
contains inline source-maps.

Fixes angular#37324

PR Close angular#37363
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 2, 2020
profanis pushed a commit to profanis/angular that referenced this issue Sep 5, 2020
…ps (angular#37363)

Inline source-maps in typings files can impact IDE performance
so ngcc should only add such maps if the original typings file
contains inline source-maps.

Fixes angular#37324

PR Close angular#37363
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: compiler Issues related to `ngc`, Angular's template compiler state: confirmed type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants