google / startup-os

Working examples of Google's Open Source stack and deployment to the cloud.
Apache License 2.0
673 stars 101 forks source link

MessageDifferencer ignoreFields doesn't work for RepeatedFields. #580

Open sumitbh250 opened 4 years ago

sumitbh250 commented 4 years ago

    message B {
        message C {
            optional string details = 1;
            optional string time = 2;
        }
        repeated C c = 1;
    }
    repeated B b = 1;
}```

If message is of the above form and if we add details to ignoreField MessageDifferencer.compare doesn't work if number of RepeatedFields is different.
oferb commented 4 years ago

We just forked the code in truth. Can you put this issue on the truth repo? https://github.com/google/truth

sumitbh250 commented 4 years ago

@oferb Can you point me to this file in truth repo? It seems it's not present there.

oferb commented 4 years ago

Indeed, looks like it was deleted: https://github.com/google/truth/commit/b00942127329c8ff8f9587a391c0b610f764efc1

oferb commented 4 years ago

Perhaps this is the new differencer? https://github.com/google/truth/blob/master/extensions/proto/src/main/java/com/google/common/truth/extensions/proto/ProtoTruthMessageDifferencer.java