-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Optimize unit tests #5299
Optimize unit tests #5299
Conversation
b48c98a
to
437ceb1
Compare
extensions: ['.js'], | ||
onParseFile: function(data) { data.src = data.src.replace(/import \* as/g, "//import * as"); } | ||
onParseFile: function(data) { data.src = data.src.replace(/\/\* circular \*\//g, "//"); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cheater!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no other way to do it :) The right way to do the check is to use cjs sources, not es6, and there we cannot rely on the import as
trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is interesting that we have only one place in our code base where this is necessary. Maybe we can restructure our code to get rid of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent a while on the other way to do it, and would love to show you :)
Will you be in the office today?
On Mon, Nov 16, 2015 at 9:20 AM Victor Savkin notifications@github.com
wrote:
In gulpfile.js
#5299 (comment):extensions: ['.js'],
- onParseFile: function(data) { data.src = data.src.replace(/import * as/g, "//import * as"); }
- onParseFile: function(data) { data.src = data.src.replace(//* circular *//g, "//"); }
There is no other way to do it :) The right way to do the check is to use
cjs sources, not es6, and there we cannot rely on the import as trick.—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/5299/files#r44952906.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worked with Tobias on that circular dep. I think we should remove it by
making it a type-checker-only dependency. I'll show you.
Here was my work on this: #4454
On Mon, Nov 16, 2015 at 9:21 AM Alex Eagle alexeagle@google.com wrote:
I spent a while on the other way to do it, and would love to show you :)
Will you be in the office today?On Mon, Nov 16, 2015 at 9:20 AM Victor Savkin notifications@github.com
wrote:In gulpfile.js
#5299 (comment):extensions: ['.js'],
- onParseFile: function(data) { data.src = data.src.replace(/import * as/g, "//import * as"); }
- onParseFile: function(data) { data.src = data.src.replace(//* circular *//g, "//"); }
There is no other way to do it :) The right way to do the check is to use
cjs sources, not es6, and there we cannot rely on the import as trick.—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/5299/files#r44952906.
discussed in person. lgtm |
70a031c
to
a6f63b9
Compare
Since editors and IDEs do typechecking and show errors in place, often there is no benefit to running type checking in our test pipeline. This PR allows you to disable type checking: gulp test.unit.js --noTypeChecks This commit also makes es6 generation optional. fix(build): removes unnecessary circular dependencies
a6f63b9
to
68422d3
Compare
Merging PR #5299 on behalf of @vsavkin to branch presubmit-vsavkin-pr-5299. |
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. |
Before:
initial 20s incremental: 5.5s
Before with noEmitOnError=false manually patched-in:
initial 18s incremental: 3.15s
After:
initial 7.7s incremental: 0.5s
It is faster for the following two reasons:
Now, the time is split more-or-less equally between Funnel, MergeTrees, and TS.
This PR also fixed the circular dependencies check that was broken.