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#53126

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#53126
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 22, 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

@clydin clydin added the target: minor This PR is targeted for the next minor release label Nov 22, 2023
@pullapprove pullapprove bot requested a review from AndrewKushnir November 22, 2023 23:15
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 22, 2023
…ically set

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.
@clydin clydin force-pushed the compiler/jsdocparsingmode branch from 0298375 to 8749bc2 Compare November 23, 2023 04:40
@clydin clydin removed the request for review from AndrewKushnir November 23, 2023 15:07
@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 23, 2023
@pkozlowski-opensource pkozlowski-opensource added the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 27, 2023
@ngbot ngbot bot added this to the Backlog milestone Nov 27, 2023
@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit 79ff91a.

@clydin clydin deleted the compiler/jsdocparsingmode branch November 27, 2023 12:59
clydin added a commit to clydin/angular that referenced this pull request Nov 30, 2023
…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.
dylhunn pushed a commit that referenced this pull request Dec 1, 2023
…ically set again (#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 #53126 which updates the other DelegatingCompilerHost.

PR Close #53292
@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 Dec 28, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ically set (angular#53126)

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.

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

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.

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

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.

PR Close angular#53126
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.