Skip to content

refactor(ivy): prefix all instructions - #29692

Closed
benlesh wants to merge 2 commits into
angular:masterfrom
benlesh:prefix_instructions
Closed

benlesh wants to merge 2 commits into
angular:masterfrom
benlesh:prefix_instructions

Conversation

@benlesh

@benlesh benlesh commented Apr 3, 2019 •

Copy link
Copy Markdown
Contributor

Updates all exported Ivy template instructions to be prefixed with a greek delta, per this design document

@benlesh
benlesh requested review from a team April 3, 2019 20:59
@benlesh benlesh added comp: ivy target: major This PR is targeted for the next major release risk: low refactoring Issue that involves refactoring or code-cleanup labels Apr 3, 2019
@ngbot ngbot Bot modified the milestone: needsTriage Apr 3, 2019
@benlesh

benlesh commented Apr 3, 2019

Copy link
Copy Markdown
Contributor Author

presubmit

Comment thread third_party/github.com/yarnpkg/yarn/releases/download/v1.13.0/bin/yarn.js Outdated
@benlesh
benlesh force-pushed the prefix_instructions branch 3 times, most recently from 3e26a6e to e8cb2aa Compare April 3, 2019 23:34
Comment thread packages/core/src/core_render3_private_export.ts Outdated
Comment thread packages/core/src/core_render3_private_export.ts Outdated
Comment thread packages/core/src/core_render3_private_export.ts Outdated
Comment thread packages/core/src/core_render3_private_export.ts Outdated
Comment thread packages/core/src/core_render3_private_export.ts Outdated
Comment thread packages/core/src/render3/instructions/change_detection.ts Outdated
Comment thread packages/core/src/render3/jit/environment.ts Outdated
Comment thread packages/core/test/render3/change_detection_spec.ts Outdated
Comment thread packages/core/test/render3/change_detection_spec.ts Outdated
Comment thread packages/core/test/render3/change_detection_spec.ts Outdated
@benlesh

benlesh commented Apr 4, 2019

Copy link
Copy Markdown
Contributor Author

Well, I'm not sure this character is going to work out, @mhevery... here's what it looks like on github's mobile UI:
Screenshot_20190404-083113

@benlesh
benlesh force-pushed the prefix_instructions branch from e8cb2aa to f7f91f1 Compare April 4, 2019 20:16
@benlesh
benlesh requested a review from IgorMinar as a code owner April 4, 2019 20:16
@benlesh
benlesh requested review from a team April 4, 2019 20:16

@petebacondarwin petebacondarwin left a comment •

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.

On behalf of docs-infra. Although I recently changed just that line, which is why there is a conflict.

@benlesh
benlesh force-pushed the prefix_instructions branch from f7f91f1 to 5b34c3d Compare April 5, 2019 16:14
@benlesh
benlesh force-pushed the prefix_instructions branch from 5b34c3d to 1230778 Compare April 5, 2019 17:20
@benlesh benlesh removed the state: WIP label Apr 5, 2019
@benlesh benlesh added 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 state: WIP labels Apr 9, 2019
@benlesh

benlesh commented Apr 9, 2019

Copy link
Copy Markdown
Contributor Author

Caretaker: @mhevery is global approver.

Comment thread packages/core/src/render3/DELTA_INSTRUCTIONS.md Outdated
Comment thread packages/core/src/render3/STATUS.md 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.

it's really misleading to call these "@publicapi" - they are not. we don't want people to start using them as any other api marked as "@publicapi". Can we remove these jsdoc tags? or could we rename these to @deltaApi instead?

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.

That's a great idea! But I think we should tackle that in a separate PR. There are places where publicApi is checked for in our CI process, and I don't have enough context to work on those things, nor can I prioritize it at the moment, because it's not critical to reworking our instruction set.

I've added a JIRA ticket for this: https://angular-team.atlassian.net/browse/FW-1235

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.

discussed in person... we'll change this to @deltaApi in a separate PR.

Comment thread packages/core/src/di/interface/defs.ts Outdated
Comment thread packages/core/src/di/injector_compatibility.ts Outdated
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.

can't we just remove this? this is not a public api, so we should be able to remove rather than deprecate.

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.

I'm not sure. declaredInputs was not related to this change. Just BaseDef was renamed, which we can't remove, as it's used in generated code. If we do need to removed declaredInputs it should probably be handled in a different commit.

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.

can we get @alxhub or @mhevery to weigh in on this? we should consider cleaning this up while we can, unless we really have to support the old api because we have code on npm using it.

@googlebot

Copy link
Copy Markdown

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@mary-poppins

Copy link
Copy Markdown

You can preview c0e7747 at https://pr29692-c0e7747.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview f42e786 at https://pr29692-f42e786.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview b2f38cf at https://pr29692-b2f38cf.ngbuilds.io/.

- Updates all instructions to be prefixed with the Greek delta symbol
@benlesh
benlesh force-pushed the prefix_instructions branch from f42e786 to bb929b5 Compare April 10, 2019 17:29
@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@mary-poppins

Copy link
Copy Markdown

You can preview bb929b5 at https://pr29692-bb929b5.ngbuilds.io/.

@benlesh
benlesh requested a review from IgorMinar April 10, 2019 18:56
@mary-poppins

Copy link
Copy Markdown

You can preview 57d43b7 at https://pr29692-57d43b7.ngbuilds.io/.

@IgorMinar IgorMinar closed this in 138ca5a Apr 10, 2019
benlesh added a commit to benlesh/angular that referenced this pull request Apr 11, 2019
The delta caused issue with other infrastructure, and we are temporarily changing it to `ɵɵ`.

Related angular#29692
benlesh added a commit to benlesh/angular that referenced this pull request Apr 12, 2019
The delta caused issue with other infrastructure, and we are temporarily changing it to `ɵɵ`.

Related angular#29692
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
- Updates all instructions to be prefixed with the Greek delta symbol

PR Close angular#29692
@trotyl

trotyl commented Apr 24, 2019 •

Copy link
Copy Markdown
Contributor

@benlesh @ocombe @mhevery @IgorMinar
Sorry for the late reply on merged PR, but are you sure inject() should only be used by compiler generated code? Which is current documented the preferred way for tree-shakable factory provider to specify dependencies, even still remains in public documentation:

https://angular.io/api/core/InjectionToken#tree-shakable-injectiontoken

class MyService {
  constructor(readonly myDep: MyDep) {}
}
 
const MY_SERVICE_TOKEN = new InjectionToken<MyService>('Manually constructed MyService', {
  providedIn: 'root',
  factory: () => new MyService(inject(MyDep)), // <- HERE
});
 
const instance = injector.get(MY_SERVICE_TOKEN);
expect(instance instanceof MyService).toBeTruthy();
expect(instance.myDep instanceof MyDep).toBeTruthy();

EDIT: It’s not the preferred way, but the only way.

@trotyl trotyl mentioned this pull request Apr 24, 2019
1 of 12 tasks
@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 15, 2019
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 cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note refactoring Issue that involves refactoring or code-cleanup risk: low target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants