Simplify entity comparison using meta description#51
Open
AntoninGoslin wants to merge 10 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I changed the logic of Famix Simple Diff, and we are now using meta models and Moose description instead of slots.
Here are the things that I changed:
is now like this
we use Moose description with the method allProperties to get all the properties of the models.
We want the primitive types(Number,Boolean,String). They represent all the properties of the models.
We exclude the derived properties to not have the same differences multiple times.
We also exclude numberOfLinesOfCode which is useless for the comparison.
As we dont have slots anymore, we can't use read to use them. So now we are using getRawFrom, which is the equivalent for Moose meta models.
I changed this code:
to this code
This is the same logic. We get all the properties of the models that are not primitives one (objects, so relations). To do so, I changed the method compareRelation:from:to: in order to use getRawFrom: instead of read.
We are now using isMultivalued to know is relations are toOne or toMany.
All tests are OK with this new logic.
Closes issue #4