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: work around 'noImplicityAny' incompatibility due to ts3.7 update #34798

Closed
wants to merge 4 commits into from

Conversation

IgorMinar
Copy link
Contributor

@IgorMinar IgorMinar commented Jan 15, 2020

Typescript 3.7 now emits d.ts files for getters differently than prior versions,
and there seems to be a bug in how it strips private types without replacing them
with explicit 'any' type. This then leads to compilation failures in projects compiled
against our packages that don't have skipLibCheck turned on but do have strict or
noImplicitAny check on.

I'm working around this by marking the affected getters as @internal and
adding a test to prevent future regressions.

Typescript bug report: microsoft/TypeScript#36216

@alan-agius4 alan-agius4 marked this pull request as ready for review January 15, 2020 21:40
@alan-agius4 alan-agius4 requested a review from a team as a code owner January 15, 2020 21:40
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@IgorMinar IgorMinar requested review from a team as code owners January 16, 2020 02:52
@IgorMinar IgorMinar changed the title fix: make all typings integration tests use ts strict mode fix: work around 'noImplicityAny' incompatibility due to ts3.7 update Jan 16, 2020
@mary-poppins
Copy link

You can preview 3030685 at https://pr34798-3030685.ngbuilds.io/.

we should try to reuse as many dependencies as we can from the top level node_modules.
previously they didn't which was a bug/oversight.
skipLibCheck=false is currently the default (in tsc 3.7.4) but it wouldn't be shocking if the default
changed in the future because skipLibCheck=true makes more sense in almost all scenarios. So just to be
defensive and explicit, I'm setting the flag to false even though it's the current default.
@IgorMinar IgorMinar added area: build & ci Related the build and CI infrastructure of the project area: core Issues related to the framework runtime type: bug/fix labels Jan 16, 2020
@ngbot ngbot bot modified the milestone: needsTriage Jan 16, 2020
@mary-poppins
Copy link

You can preview 5da86df at https://pr34798-5da86df.ngbuilds.io/.

@IgorMinar IgorMinar added target: patch This PR is targeted for the next patch release cla: no cla: yes action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed cla: yes cla: no action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Jan 16, 2020
Typescript 3.7 now emits d.ts files for getters differently than prior versions,
and there seems to be a bug in how it strips private types without replacing them
with explicit 'any' type. This then leads to compilation failures in projects compiled
against our packages that don't have skipLibCheck turned on but do have strict or
noImplicitAny check on.

I'm working around this by marking the affected getters as @internal and
adding a test to prevent future regressions.

I believe this is a TypeScript bug, and I filed a bug report:
microsoft/TypeScript#36216
@IgorMinar
Copy link
Contributor Author

merge-assistance: global approval

@mary-poppins
Copy link

You can preview 355ecdf at https://pr34798-355ecdf.ngbuilds.io/.

@matsko matsko closed this in 39ab72e Jan 16, 2020
matsko pushed a commit that referenced this pull request Jan 16, 2020
previously they didn't which was a bug/oversight.

PR Close #34798
matsko pushed a commit that referenced this pull request Jan 16, 2020
skipLibCheck=false is currently the default (in tsc 3.7.4) but it wouldn't be shocking if the default
changed in the future because skipLibCheck=true makes more sense in almost all scenarios. So just to be
defensive and explicit, I'm setting the flag to false even though it's the current default.

PR Close #34798
matsko pushed a commit that referenced this pull request Jan 16, 2020
…#34798)

Typescript 3.7 now emits d.ts files for getters differently than prior versions,
and there seems to be a bug in how it strips private types without replacing them
with explicit 'any' type. This then leads to compilation failures in projects compiled
against our packages that don't have skipLibCheck turned on but do have strict or
noImplicitAny check on.

I'm working around this by marking the affected getters as @internal and
adding a test to prevent future regressions.

I believe this is a TypeScript bug, and I filed a bug report:
microsoft/TypeScript#36216

PR Close #34798
matsko pushed a commit that referenced this pull request Jan 16, 2020
)

we should try to reuse as many dependencies as we can from the top level node_modules.

PR Close #34798
matsko pushed a commit that referenced this pull request Jan 16, 2020
previously they didn't which was a bug/oversight.

PR Close #34798
matsko pushed a commit that referenced this pull request Jan 16, 2020
skipLibCheck=false is currently the default (in tsc 3.7.4) but it wouldn't be shocking if the default
changed in the future because skipLibCheck=true makes more sense in almost all scenarios. So just to be
defensive and explicit, I'm setting the flag to false even though it's the current default.

PR Close #34798
matsko pushed a commit that referenced this pull request Jan 16, 2020
…#34798)

Typescript 3.7 now emits d.ts files for getters differently than prior versions,
and there seems to be a bug in how it strips private types without replacing them
with explicit 'any' type. This then leads to compilation failures in projects compiled
against our packages that don't have skipLibCheck turned on but do have strict or
noImplicitAny check on.

I'm working around this by marking the affected getters as @internal and
adding a test to prevent future regressions.

I believe this is a TypeScript bug, and I filed a bug report:
microsoft/TypeScript#36216

PR Close #34798
matsko added a commit to matsko/angular that referenced this pull request Jan 17, 2020
matsko added a commit to matsko/angular that referenced this pull request Jan 17, 2020
matsko added a commit to matsko/angular that referenced this pull request Jan 17, 2020
matsko added a commit to matsko/angular that referenced this pull request Jan 17, 2020
@JoostK
Copy link
Member

JoostK commented Jan 23, 2020

Upstream fix in TypeScript has been backported to 3.6.5: https://github.com/microsoft/TypeScript/releases/tag/v3.6.5

@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 Feb 23, 2020
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 area: build & ci Related the build and CI infrastructure of the project area: core Issues related to the framework runtime cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants