-
Notifications
You must be signed in to change notification settings - Fork 12k
ng lint 10x slower than direct tslint #4675
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
Comments
Type checking is enabled in the ng variant. |
Don't I get type checking for free from tsc when compiling anyway?
Am 13.02.2017 22:41 schrieb "clydin" <[email protected]>:
… Type checking is enabled in the ng variant.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4675 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAH8N2r6HCUl6-6JbdH3H09eD_vgU4Uuks5rcM4AgaJpZM4L_u-y>
.
|
There's additional lint rules (not include by default) that require type information. |
Removing the "project" setting from the "lint" section of angular-cli.json results in this error:
|
This is a real issue. I tried running See the timings below:
I'm running it on an empty newly generated project using angular-cli master commit 469ca91 |
@Luftzig I wonder if you are not missing the |
Also note that ng lint currently runs against the app, test, and e2e elements of the project. |
Heya, is such a big descrepancy still a thing? It should be slower than running But I think there was a bug that made it not ignore |
@filipesilva I don't know about the performance problem but the |
@filipesilva if you have the time to try, you can always experiment with a project like the one I'm working on (https://gitlab.com/linagora/petals-cockpit, run ng lint from the
|
Taking two times longer is still within the expected range due to the type checking that @clydin mentioned in #4675 (comment). Not ignoring |
@victornoel I looked further into this, and as far as I can tell you only need to exclude This is a case where I think one should exclude it manually. There are TS rules that need type-checking information so it makes sense to default to checking them. See more about this in @delasteve's post in #4350 (comment).
|
@filipesilva thanks for detailed explanation :) |
@filipesilva a quick question, why is this a bad practice to include the ts file in the published artefact and is there some source for this assertion? The author of a library that publishes ts files is asking me this question :) |
@victornoel generally it's discouraged to ship TypeScript with third party libraries because it would require the consumer to replicate the complete build environment of the library. Not only typings, but potentially a specific version of Publishing plain JavaScript with typings and meta data allows the consuming application to remain agnostic of the library's build environment. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
OS X Sierra
Versions.
Repro steps.
Using a reasonably large repo with these package.json scripts:
I get the following runtimes:
The log given by the failure.
I have no idea why
ng lint
should take so absurdly long compared to vanillatslint
. I'm using the standard tslint.json generated byng init
and"codelyzer": "^2.0.0"
(also tried with 2.0.0-beta.4, no change).Mention any other details that might be useful.
Any idea where the difference comes from? Any input I can provide to debug this?
The text was updated successfully, but these errors were encountered: