-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Cleaning up code by making vnode.attrs always non-null #2819
Conversation
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](caolan/async@v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Because vnode.attrs is never null by commit f9e5163
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's truly redundant, the tests shouldn't need modified. Please revise this such that tests can pass as-is.
I suspect your intuition is right, but the patch as written is not.
@dead-claudia we're ignoring
When there are other props I'd rather avoid 1). Regarding 2) I assume that |
@pygy My concern wasn't perf, but in unnecessary breakage and ensuring it's only removing the truly redundant parts. Any changes to the tests reduces my confidence in the removed parts being truly redundant, if it helps. |
Understood but in this case I'm not sure the tests are right. If the intent was to filter |
Thanks for the review. I understand your motivation for not wanting to change the test, but please consider that the changed test is changed by the commit f9e5163 (which made attrs always non-null), too.
As a result of removing just such a process, the test needed to be changed... |
Because vnode.attrs is never null by commit f9e5163
51fa771
to
51a1f35
Compare
To make the purpose of this pr easier to understand, I have re-modified the code with minimal changes. I have reverted back to the original logic for the following lines, but there seems to be a bug when sharing attrs, so I would like to issue a separate issue or pr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, let's at least get it into next
and we can see if there's any observable perf difference in the wild?
Closed due to the @JAForbes If you get a chance, can you figure out how this fares in |
Will try to find the time, if not @kfule I think we'd be happy to merge this if you could re-open the PR against main and run |
@JAForbes ok, I will re-open the PR against main. |
I re-opened the PR at #2977. |
Commit f9e5163 made vnode.attrs always non-null, so there is no need for code to make vnode.attrs null or assume vnode.attrs is null.
Description
The following two processes have been removed
For the latter, the behavior will change when there is only key in attrs (key is not removed from attrs). Some tests have also been changed to ensure that the changes are appropriate.
Motivation and Context
There is still a not very useful code that assumes that vnode.attrs will be null. Removing that code will reduce the amount of code and improve the outlook of the process.
How Has This Been Tested?
Running "npm run test"
Types of changes
Checklist:
docs/changelog.md