Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Build Optimizer Lightweight Transformations #346

Merged
merged 2 commits into from
Jan 2, 2018
Merged

Build Optimizer Lightweight Transformations #346

merged 2 commits into from
Jan 2, 2018

Conversation

clydin
Copy link
Member

@clydin clydin commented Dec 22, 2017

This provides a transformation fast path when source maps are not enabled and transformers that require the type checker are not needed for a file (scrub-file/fold-file). This also has the advantage of not running any of the built-in (and unneeded) transformers when used.
There doesn't appear to be a publicly exposed mechanism to generate source maps with the TS printer. If this were possible, the source map limitation could be lifted.

@@ -88,7 +88,7 @@ describe('build-optimizer', () => {
});
});

it('doesn\'t process files without decorators/ctorParameters/outside Angular', () => {
xit('doesn\'t process files without decorators/ctorParameters/outside Angular', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this test removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test should have been failing as prefix-classes will add the annotation but testPrefixClasses doesn't accept var Clazz = (function () { function Clazz() { } return Clazz; }());.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, this test isn't true anymore at all since we do process all files in some capacity... Maybe it's better to wholly remove the test instead of just doing xit then. What do you think?

It's probably true that processing all files is what's leading to slow builds though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the test as it is outdated now.

@filipesilva filipesilva merged commit fb22c8d into angular:master Jan 2, 2018
@clydin clydin deleted the lightweight-transformations branch January 2, 2018 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants