Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ivy): prefix all instructions #29692

Closed
wants to merge 2 commits into from

Conversation

benlesh
Copy link
Contributor

@benlesh benlesh commented Apr 3, 2019

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

@benlesh benlesh requested review from a team as code owners 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
Copy link
Contributor Author

benlesh commented Apr 3, 2019

presubmit

@benlesh benlesh force-pushed the prefix_instructions branch 3 times, most recently from 3e26a6e to e8cb2aa Compare April 3, 2019 23:34
packages/core/src/core_render3_private_export.ts Outdated Show resolved Hide resolved
packages/core/src/core_render3_private_export.ts Outdated Show resolved Hide resolved
packages/core/src/core_render3_private_export.ts Outdated Show resolved Hide resolved
packages/core/src/core_render3_private_export.ts Outdated Show resolved Hide resolved
packages/core/src/core_render3_private_export.ts Outdated Show resolved Hide resolved
packages/core/src/render3/instructions/change_detection.ts Outdated Show resolved Hide resolved
packages/core/src/render3/jit/environment.ts Outdated Show resolved Hide resolved
packages/core/test/render3/change_detection_spec.ts Outdated Show resolved Hide resolved
packages/core/test/render3/change_detection_spec.ts Outdated Show resolved Hide resolved
packages/core/test/render3/change_detection_spec.ts Outdated Show resolved Hide resolved
@benlesh
Copy link
Contributor Author

benlesh commented Apr 4, 2019

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

Copy link
Member

@petebacondarwin petebacondarwin left a comment

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 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
Copy link
Contributor Author

benlesh commented Apr 9, 2019

Caretaker: @mhevery is global approver.

packages/core/src/render3/DELTA_INSTRUCTIONS.md Outdated Show resolved Hide resolved
packages/core/src/render3/STATUS.md Outdated Show resolved Hide resolved
@@ -16,8 +16,10 @@ import {NO_CHANGE} from '../tokens';
* Allocates the necessary amount of slots for host vars.
*
* @param count Amount of vars to be allocated
*
* @publicApi
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 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
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
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.

packages/core/src/di/interface/defs.ts Outdated Show resolved Hide resolved
packages/core/src/di/injector_compatibility.ts Outdated Show resolved Hide resolved
export declare function ΔallocHostVars(count: number): void;

export interface ΔBaseDef<T> {
/** @deprecated */ readonly declaredInputs: {
Copy link
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
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
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

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

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

@mary-poppins
Copy link

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

@mary-poppins
Copy link

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

- Updates all instructions to be prefixed with the Greek delta symbol
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@mary-poppins
Copy link

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

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
Copy link
Contributor

trotyl commented Apr 24, 2019

@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.

@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 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 aio: preview 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.

None yet

10 participants