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

fix(@angular-devkit/build-optimizer): use TypeScript 3.6 #17364

Merged
merged 2 commits into from
Apr 6, 2020

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 1, 2020

When used within the build optimizer, TypeScript 3.8 will consider certain imports to be unreferenced and errantly remove them even though they are used within the module. This results in runtime errors during application load. TypeScript 3.7 cannot be used due to it causing a build time error when used within the build optimizer. The build optimizer uses an independent version of TypeScript which allows it to use TypeScript 3.6 while applications continue to use TypeScript 3.7 or 3.8 to build the actual application.

Fixes: #17320

@clydin clydin added the target: patch This PR is targeted for the next patch release label Apr 1, 2020
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM

  • Do you know if this is fixed in TS 3.9?
  • Can we report this issue to the TS team?

@clydin
Copy link
Member Author

clydin commented Apr 2, 2020

TS 3.9 exhibits the same problem.
The issue has not yet been reported upstream. Work is ongoing to produce a minimal reproduction.

@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Apr 2, 2020
@mgechev mgechev merged commit 6e33f44 into angular:master Apr 6, 2020
@clydin clydin deleted the downgrade-bo-ts branch April 6, 2020 16:57
@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 May 7, 2020
@alan-agius4
Copy link
Collaborator

Managed to fix the root cause and reported opened an issue upstream: microsoft/TypeScript#38412

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(moment-adapter): "_rollupMoment__default is not defined"
4 participants