Skip to content

refactor(core): tree-shake application_module providers#23477

Closed
matsko wants to merge 0 commit into
angular:masterfrom
matsko:treeshake_providers_2
Closed

refactor(core): tree-shake application_module providers#23477
matsko wants to merge 0 commit into
angular:masterfrom
matsko:treeshake_providers_2

Conversation

@matsko
Copy link
Copy Markdown
Contributor

@matsko matsko commented Apr 20, 2018

No description provided.

@matsko matsko force-pushed the treeshake_providers_2 branch 5 times, most recently from 04dc1ff to d075a70 Compare April 23, 2018 18:40
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this expected?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mhevery this is unexpected. This should've been retained as before.

Comment thread packages/core/src/application_ref.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

_Factory? why not ApplicationRefFactory?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I spoke with misko and we agreed that this convention was ok because that's what the compiler generates, but we were not sure why you are using ngInjectableDef at all.

Comment thread packages/core/src/application_module.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this right? why do we need this here? maybe explain in a comment?

Comment thread packages/core/src/application_init.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove _?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ignore

Comment thread tools/public_api_guard/core/core.d.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not keen on exposing these static properties. Is this the only way to do this?

the issue is that ngInjectableDef is not a public api, but people will start depending on it if they see us use it in this way.

// @mhevery

Comment thread packages/core/src/application_ref.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Casting Inector to any does not seem right.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

File a bug inject(Injector as any), and reference it here.

Comment thread packages/core/src/application_ref.ts Outdated
Copy link
Copy Markdown
Contributor

@mhevery mhevery Apr 23, 2018

Choose a reason for hiding this comment

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

Why are you using defineInjectable rather than @Injectable decorator?

Comment thread packages/core/src/linker/compiler.ts Outdated
Copy link
Copy Markdown
Contributor

@mhevery mhevery Apr 23, 2018

Choose a reason for hiding this comment

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

you should not have both @Injectable and defineinjectable one or the other.

@matsko matsko force-pushed the treeshake_providers_2 branch 3 times, most recently from 838cf7a to e85e1fe Compare April 24, 2018 20:29
@vicb vicb added the area: core Issues related to the framework runtime label Apr 24, 2018
@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Apr 24, 2018
@ngbot
Copy link
Copy Markdown

ngbot Bot commented Apr 24, 2018

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure missing required label: "PR target: *"
    failure status "continuous-integration/travis-ci/pr" is failing
    pending status "google3" 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 master, please try rebasing to master 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.

@IgorMinar
Copy link
Copy Markdown
Contributor

@matsko CI is failing because of legit docs issue - please fix it.

@IgorMinar IgorMinar added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Apr 24, 2018
@matsko matsko force-pushed the treeshake_providers_2 branch from e85e1fe to 8ee8d88 Compare April 24, 2018 22:34
@matsko matsko force-pushed the treeshake_providers_2 branch from 8ee8d88 to 822531c Compare April 25, 2018 19:59
@mary-poppins
Copy link
Copy Markdown

You can preview 822531c at https://pr23477-822531c.ngbuilds.io/.

@matsko matsko force-pushed the treeshake_providers_2 branch from 822531c to f145989 Compare April 25, 2018 20:14
@mary-poppins
Copy link
Copy Markdown

You can preview f145989 at https://pr23477-f145989.ngbuilds.io/.

@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Apr 25, 2018
@IgorMinar IgorMinar closed this in eb031c6 Apr 25, 2018
@IgorMinar IgorMinar reopened this Apr 27, 2018
IgorMinar added a commit that referenced this pull request Apr 27, 2018
 1�7)"

This reverts commit eb031c6.

The change is breaking targets in g3 see cl/194336387.
@IgorMinar
Copy link
Copy Markdown
Contributor

I had to revert this one because it breaks internal apps. see cl/194336387 + the rollback cl for more info

@mary-poppins
Copy link
Copy Markdown

You can preview f145989 at https://pr23477-f145989.ngbuilds.io/.

IgorMinar added a commit that referenced this pull request Apr 27, 2018
 1�7)"

This reverts commit ac2b530.

The change is breaking targets in g3 see cl/194336387.
@IgorMinar IgorMinar added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Apr 27, 2018
@matsko matsko closed this May 15, 2018
@matsko matsko force-pushed the treeshake_providers_2 branch from f145989 to d4b6c41 Compare May 15, 2018 18:35
@matsko matsko deleted the treeshake_providers_2 branch January 17, 2019 19:44
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews area: core Issues related to the framework runtime cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants