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

Make ArrayUpdater backwards compatible #4427

Merged
merged 2 commits into from
Jul 23, 2018

Conversation

gilberto-torrezan
Copy link
Contributor

@gilberto-torrezan gilberto-torrezan commented Jul 23, 2018

This change is Reviewable

@gilberto-torrezan gilberto-torrezan added this to the 1.1.0.alpha2 milestone Jul 23, 2018
@gilberto-torrezan gilberto-torrezan self-assigned this Jul 23, 2018
Copy link
Contributor

@ZheSun88 ZheSun88 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained


flow-data/src/main/java/com/vaadin/flow/data/provider/ArrayUpdater.java, line 131 at r1 (raw file):

         *            {@link JsonCodec}
         */
        void enqueue(String name, Serializable... arguments);

this is also method added from the last commit. cb03998#diff-16bd1774bec0a0a2223b28d5d9b1a294R125

should this be removed ?

@gilberto-torrezan gilberto-torrezan force-pushed the gilberto/non_breaking_array_updater branch from da7635e to 48ead47 Compare July 23, 2018 06:41
Copy link
Contributor Author

@gilberto-torrezan gilberto-torrezan left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained


flow-data/src/main/java/com/vaadin/flow/data/provider/ArrayUpdater.java, line 131 at r1 (raw file):

Previously, ZheSun88 (Sun Zhe) wrote…

this is also method added from the last commit. cb03998#diff-16bd1774bec0a0a2223b28d5d9b1a294R125

should this be removed ?

Good catch. Made it default as the others.

Copy link
Contributor

@ZheSun88 ZheSun88 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 1 of 2 files at r1, 1 of 1 files at r2.
Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained, and 1 stale

With the HierarchicalArrayUpdater interface, the logic needed for
TreeGrid (or any hierarchical listing component) is separated from the
ArrayUpater interface, making the ArrayUpater itself backwards
compatible.
@@ -170,9 +168,9 @@ public void reset() {
public void setParentRequestedRange(int start, int length, T parentItem) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

CRITICAL Document this public method by adding an explicit description. rule

@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 14 issues

  • BLOCKER 2 blocker
  • CRITICAL 7 critical
  • MAJOR 4 major
  • INFO 1 info

Watch the comments in this conversation to review them.

Top 10 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. BLOCKER HierarchicalCommunicationController.java#: Add or update the header of this file. rule
  2. BLOCKER HierarchicalDataCommunicator.java#: Add or update the header of this file. rule
  3. CRITICAL HierarchicalCommunicationController.java#L112: Document this public method by adding an explicit description. rule
  4. CRITICAL HierarchicalCommunicationController.java#L147: Document this public method by adding an explicit description. rule
  5. CRITICAL HierarchicalCommunicationController.java#L151: Document this public method by adding an explicit description. rule
  6. CRITICAL HierarchicalCommunicationController.java#L295: Document this public method by adding an explicit description. rule
  7. CRITICAL HierarchicalCommunicationController.java#L326: Document this public method by adding an explicit description. rule
  8. CRITICAL HierarchicalDataCommunicator.java#L264: Document this public method by adding an explicit description. rule
  9. MAJOR HierarchicalDataCommunicator.java#L68: Make "object" transient or serializable. rule
  10. MAJOR HierarchicalDataCommunicator.java#L114: Remove this call from a constructor to the overridable "setKeyMapper" method. rule

Copy link
Contributor

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r3.
Reviewable status: 2 unresolved discussions, 0 of 1 LGTMs obtained, and 1 stale

a discussion (no related file):
This is kind of step back after the step forward (or the other way around).
Initially there has been almost identical HierarchicalArrayUpdater class (with may be a different name).
Then @tltv merged two classes in one.
Now you split them out back.

I would like to hear @tltv reason of merging those classes.
The backward compatibility of the ArrayUpdater class is quite clear reason for me.
The question is about benefits of another approach .......
I'm not sure we have to keep backward compatibility for the quite internal class.


Copy link
Contributor Author

@gilberto-torrezan gilberto-torrezan left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 unresolved discussions, 0 of 1 LGTMs obtained, and 1 stale

a discussion (no related file):

Previously, denis-anisimov (Denis) wrote…

This is kind of step back after the step forward (or the other way around).
Initially there has been almost identical HierarchicalArrayUpdater class (with may be a different name).
Then @tltv merged two classes in one.
Now you split them out back.

I would like to hear @tltv reason of merging those classes.
The backward compatibility of the ArrayUpdater class is quite clear reason for me.
The question is about benefits of another approach .......
I'm not sure we have to keep backward compatibility for the quite internal class.

The current implementation breaks IronList, making it incompatible with the new Flow 1.1.x, which is not desirable.

The main difference of the previous implementation is actually on the Grid side. I'll make a PR to show what would need to change.


Copy link
Contributor

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained, and 1 stale

a discussion (no related file):

Previously, gilberto-torrezan (Gilberto Torrezan) wrote…

The current implementation breaks IronList, making it incompatible with the new Flow 1.1.x, which is not desirable.

The main difference of the previous implementation is actually on the Grid side. I'll make a PR to show what would need to change.

I would like to hear @tltv .
But most likely he is on vacation........

So let's go on without waiting then.


Copy link
Contributor

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained, and 2 stale

Copy link
Contributor Author

@gilberto-torrezan gilberto-torrezan left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, 1 of 1 LGTMs obtained, and 1 stale

a discussion (no related file):

Previously, denis-anisimov (Denis) wrote…

I would like to hear @tltv .
But most likely he is on vacation........

So let's go on without waiting then.

The PR for Grid/TreeGrid is here: vaadin/vaadin-grid-flow#275


Copy link
Contributor Author

@gilberto-torrezan gilberto-torrezan left a comment

Choose a reason for hiding this comment

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

Dismissed @vaadin-bot from a discussion.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained, and 1 stale

@gilberto-torrezan gilberto-torrezan merged commit 338aa05 into master Jul 23, 2018
@gilberto-torrezan gilberto-torrezan deleted the gilberto/non_breaking_array_updater branch July 23, 2018 11:01
@tltv
Copy link
Member

tltv commented Jul 23, 2018

a discussion (no related file):

Previously, gilberto-torrezan (Gilberto Torrezan) wrote…

The PR for Grid/TreeGrid is here: vaadin/vaadin-grid-flow#275

Reason of merging those classes (or adding a TODO comment actually) was purely to get rid of few extra methods and one extra interface by just adding parameters to other. And back then I had no idea that it could broke other modules.


Copy link
Contributor

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained, and 1 stale

a discussion (no related file):

Previously, tltv (Tomi Virtanen) wrote…

Reason of merging those classes (or adding a TODO comment actually) was purely to get rid of few extra methods and one extra interface by just adding parameters to other. And back then I had no idea that it could broke other modules.

Well the question was about in preferences one approach against another.
Of course you weren't aware of influence of those changes. So no problem.
Looks like backward compatibility is more important than other reasons. So let's go with that approach which is already merged anyway.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants