Repository navigation
Conversation
|
You can preview 31c0000 at https://pr27470-31c0000.ngbuilds.io/. |
|
You can preview 838ba97 at https://pr27470-838ba97.ngbuilds.io/. |
IgorMinar
approved these changes
Dec 5, 2018
|
You can preview 36510e9 at https://pr27470-36510e9.ngbuilds.io/. |
Previously the ngfactory shim generator in ngtsc would always write two imports in the factory file shims: 1) an import to @angular/core 2) an import to the base file If the base file has no exports, import #2 would be empty. This turns out to cause issues downstream. This commit changes the generated shim so if there are no exports in the base file, the generated shim is empty too.
The method `ts.CompilerHost.directoryExists` is optional, and was not previously handled by our ts.CompilerHost wrapper for factory and summary shims (GeneratedShimsHostWrapper). TypeScript checks for the existence of this method and silently ignores things like typeRoots if it's not found. This commit adds proper handling of directoryExists() to the shim. A test is also added which verifies typeRoots behavior works when shims are enabled.
This commit allows //packages/bazel/test/ngc-wrapped/... tests to run under Ivy mode. To get them to pass, it addresses a problem with the way the tests are configured: both test targets have sloppy .d.ts dependencies configured, leading to many type errors being generated in TypeScript for the .d.ts files. Due to the way ngc directs TypeScript emit, it avoids type-checking .d.ts files and thus this issue does not surface. ngtsc does a whole- program emit which results in full .d.ts type-checking by default, catching this configuration issue. To fix this, skipLibCheck is added to the tsconfig.jsons for these tests, which tells TypeScript to skip type-checking of the .d.ts files, avoiding this problem in a similar way to ngc.
Contributor
|
I've rebased and force-pushed this pr |
IgorMinar
pushed a commit
that referenced
this pull request
Dec 5, 2018
…27470) The method `ts.CompilerHost.directoryExists` is optional, and was not previously handled by our ts.CompilerHost wrapper for factory and summary shims (GeneratedShimsHostWrapper). TypeScript checks for the existence of this method and silently ignores things like typeRoots if it's not found. This commit adds proper handling of directoryExists() to the shim. A test is also added which verifies typeRoots behavior works when shims are enabled. PR Close #27470
IgorMinar
pushed a commit
that referenced
this pull request
Dec 5, 2018
…#27470) This commit allows //packages/bazel/test/ngc-wrapped/... tests to run under Ivy mode. To get them to pass, it addresses a problem with the way the tests are configured: both test targets have sloppy .d.ts dependencies configured, leading to many type errors being generated in TypeScript for the .d.ts files. Due to the way ngc directs TypeScript emit, it avoids type-checking .d.ts files and thus this issue does not surface. ngtsc does a whole- program emit which results in full .d.ts type-checking by default, catching this configuration issue. To fix this, skipLibCheck is added to the tsconfig.jsons for these tests, which tells TypeScript to skip type-checking of the .d.ts files, avoiding this problem in a similar way to ngc. PR Close #27470
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.