Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix(compiler): allow TS jsDocParsingMode host option to be programmatically set again#53292

Closed
clydin wants to merge 1 commit intoangular:mainangular/angular:mainfrom
clydin:compiler/jsdocparsingmodeclydin/angular:compiler/jsdocparsingmodeCopy head branch name to clipboard
Closed

fix(compiler): allow TS jsDocParsingMode host option to be programmatically set again#53292
clydin wants to merge 1 commit intoangular:mainangular/angular:mainfrom
clydin:compiler/jsdocparsingmodeclydin/angular:compiler/jsdocparsingmodeCopy head branch name to clipboard

Conversation

@clydin
Copy link
Member

@clydin clydin commented Nov 30, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Attempting to set the jsDocParsingMode option on a TS CompilerHost instance will currently result in the following error:
TypeError: this.delegate[name].bind is not a function

This prevents the Angular CLI from adjusting this value.

Issue Number: N/A

What is the new behavior?

When the AOT compiler creates a delegated host for a provided TypeScript CompilerHost, it delegates functionality back to the original via a series of internal method delegations. However, unlike other members of the CompilerHost, jsDocParsingMode is not a method and cannot be delegated in this way. Attempting to call bind on the property will result in a runtime error. Instead, jsDocParsingMode is now delegated via get/set accessors. Additionally, the override of getSourceFile now has an updated type signature to reflect the additional of the jsDocParsingMode option for the method.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This is a followup to #53126 which updates the other DelegatingCompilerHost.

…ically set again

When the AOT compiler creates a delegated host for a provided TypeScript CompilerHost,
it delegates functionality back to the original via a series of internal method delegations.
However, unlike other members of the CompilerHost, `jsDocParsingMode` is not a method
and cannot be delegated in this way. Attempting to call bind on the property will result
in a runtime error. Instead, `jsDocParsingMode` is now delegated via get/set accessors.
Additionally, the override of `getSourceFile` now has an updated type signature to reflect
the additional of the `jsDocParsingMode` option for the method.

This is a followup to angular#53126 which updates the other DelegatingCompilerHost.
@clydin clydin added area: compiler Issues related to `ngc`, Angular's template compiler target: minor This PR is targeted for the next minor release labels Nov 30, 2023
@clydin clydin requested a review from crisbeto November 30, 2023 19:53
@ngbot ngbot bot added this to the Backlog milestone Nov 30, 2023
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Dec 1, 2023
@dylhunn
Copy link
Contributor

dylhunn commented Dec 1, 2023

This PR was merged into the repository by commit 5613051.

@dylhunn dylhunn closed this in 5613051 Dec 1, 2023
@clydin clydin deleted the compiler/jsdocparsingmode branch December 1, 2023 18:49
@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 Jan 1, 2024
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ically set again (angular#53292)

When the AOT compiler creates a delegated host for a provided TypeScript CompilerHost,
it delegates functionality back to the original via a series of internal method delegations.
However, unlike other members of the CompilerHost, `jsDocParsingMode` is not a method
and cannot be delegated in this way. Attempting to call bind on the property will result
in a runtime error. Instead, `jsDocParsingMode` is now delegated via get/set accessors.
Additionally, the override of `getSourceFile` now has an updated type signature to reflect
the additional of the `jsDocParsingMode` option for the method.

This is a followup to angular#53126 which updates the other DelegatingCompilerHost.

PR Close angular#53292
rlmestre pushed a commit to rlmestre/angular that referenced this pull request Jan 26, 2024
…ically set again (angular#53292)

When the AOT compiler creates a delegated host for a provided TypeScript CompilerHost,
it delegates functionality back to the original via a series of internal method delegations.
However, unlike other members of the CompilerHost, `jsDocParsingMode` is not a method
and cannot be delegated in this way. Attempting to call bind on the property will result
in a runtime error. Instead, `jsDocParsingMode` is now delegated via get/set accessors.
Additionally, the override of `getSourceFile` now has an updated type signature to reflect
the additional of the `jsDocParsingMode` option for the method.

This is a followup to angular#53126 which updates the other DelegatingCompilerHost.

PR Close angular#53292
amilamen pushed a commit to amilamen/angular that referenced this pull request Jan 26, 2024
…ically set again (angular#53292)

When the AOT compiler creates a delegated host for a provided TypeScript CompilerHost,
it delegates functionality back to the original via a series of internal method delegations.
However, unlike other members of the CompilerHost, `jsDocParsingMode` is not a method
and cannot be delegated in this way. Attempting to call bind on the property will result
in a runtime error. Instead, `jsDocParsingMode` is now delegated via get/set accessors.
Additionally, the override of `getSourceFile` now has an updated type signature to reflect
the additional of the `jsDocParsingMode` option for the method.

This is a followup to angular#53126 which updates the other DelegatingCompilerHost.

PR Close angular#53292
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: compiler Issues related to `ngc`, Angular's template compiler target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.