Skip to content

fix(core): hide implementation details of ExperimentalPendingTasks#55516

Closed
pkozlowski-opensource wants to merge 1 commit intoangular:mainfrom
pkozlowski-opensource:pending_tasks_private_inject_fix
Closed

fix(core): hide implementation details of ExperimentalPendingTasks#55516
pkozlowski-opensource wants to merge 1 commit intoangular:mainfrom
pkozlowski-opensource:pending_tasks_private_inject_fix

Conversation

@pkozlowski-opensource
Copy link
Member

The ExperimentalPendingTasks service was accidentally exposing one of its internal fields as a public one. This commit fixes this by marking the field in question as private.

The ExperimentalPendingTasks service was accidently exposing one of its
internal fields as a public one. This commit fixes this by marking the
field in question as private.
@pullapprove pullapprove bot requested review from atscott and thePunderWoman April 24, 2024 19:21
@pkozlowski-opensource pkozlowski-opensource added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime labels Apr 24, 2024
@ngbot ngbot bot modified the milestone: Backlog Apr 24, 2024
@pkozlowski-opensource pkozlowski-opensource added the target: major This PR is targeted for the next major release label Apr 24, 2024
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

LGTM

reviewed-for: fw-core, public-api

@pullapprove pullapprove bot requested review from alxhub and dylhunn April 24, 2024 19:22
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@AndrewKushnir AndrewKushnir removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 24, 2024
@pkozlowski-opensource pkozlowski-opensource added the action: merge The PR is ready for merge by the caretaker label Apr 25, 2024
@ngbot
Copy link

ngbot bot commented Apr 25, 2024

I see that you just added the action: merge label, but the following checks are still failing:
    failure status "google-internal-tests" is failing
    pending status "mergeability" is pending

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken main, please try rebasing to main and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@pkozlowski-opensource pkozlowski-opensource added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Apr 25, 2024
@pkozlowski-opensource
Copy link
Member Author

caretaker note: G3 failures are unrelated (deflaked presubmit)

@AndrewKushnir AndrewKushnir added target: rc This PR is targeted for the next release-candidate and removed target: major This PR is targeted for the next major release labels Apr 25, 2024
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 90389ad.

AndrewKushnir pushed a commit that referenced this pull request Apr 25, 2024
…55516)

The ExperimentalPendingTasks service was accidently exposing one of its
internal fields as a public one. This commit fixes this by marking the
field in question as private.

PR Close #55516
})
export class ExperimentalPendingTasks {
internalPendingTasks = inject(PendingTasks);
private internalPendingTasks = inject(PendingTasks);
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason not to do

  #internalPendingTasks = inject(PendingTasks);

Copy link
Member

@JeanMeche JeanMeche Apr 25, 2024

Choose a reason for hiding this comment

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

Private props are not supported by the internal google toolings (yet).

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not just lack of support, but there are also real downsides to using them. For reference: https://google.github.io/styleguide/tsguide.html#class-members

Private identifiers cause substantial emit size and performance regressions when down-leveled by TypeScript, and are unsupported before ES2015. They can only be downleveled to ES2015, not lower. At the same time, they do not offer substantial benefits when static type checking is used to enforce visibility.

Copy link
Contributor

Choose a reason for hiding this comment

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

We are using it with ES2022 target I hope there are no performance issues with ES2022 target, as TS won't downlevel it.

@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 Jun 2, 2024
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: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants