Coder Social home page Coder Social logo

Comments (8)

oferb avatar oferb commented on May 27, 2024

Hey :)
Nope, it's not packaged.
It's taken from here though:
com.google.common.truth.extensions.proto.MessageDifferencer
So maybe you can get it from there:
https://mvnrepository.com/artifact/com.google.truth/truth

from startup-os.

sumitbh250 avatar sumitbh250 commented on May 27, 2024

@oferb Thanks for the quick response. I went through that repo too, but in that repo this class is made private https://jar-download.com/artifacts/com.google.truth.extensions/truth-proto-extension/0.39/source-code/com/google/common/truth/extensions/proto/MessageDifferencer.java. Any way I can use truth library to receive a boolean instead of assert for Message comparisons that you might be aware of?

from startup-os.

oferb avatar oferb commented on May 27, 2024

Maybe you can send them a PR? :-)
It's just a small 1 word change :-))

Any way I can use truth library to receive a boolean instead of assert for Message comparisons that you might be aware of?
I'm not well-acquainted with that code, so I don't know.

But you can also just copy the class and use it.. or maybe in the meantime until they accept your PR :))

from startup-os.

sumitbh250 avatar sumitbh250 commented on May 27, 2024

I tried copying the class locally but faced compilation issue of dependency
MessageDifferencer.java:[484,17] error: cannot find symbol [ERROR] symbol: class AutoValue_MessageDifferencer_SpecificField [ERROR] location: class SpecificField

I have added auto.value and auto.value.annotation to dependencies
<dependency> <groupId>com.google.auto.value</groupId> <artifactId>auto-value-annotations</artifactId> <version>1.7</version> </dependency> <dependency> <groupId>com.google.auto.value</groupId> <artifactId>auto-value</artifactId> <version>1.7</version> <scope>provided</scope> </dependency>

from startup-os.

sumitbh250 avatar sumitbh250 commented on May 27, 2024

I'll mark this as resolved here. Thanks for the help :)

from startup-os.

 avatar commented on May 27, 2024

Hi @sumitbh250 , did you manage to use this MessageDifferencer class?

from startup-os.

drather19 avatar drather19 commented on May 27, 2024

@frankfighton fyi, if you'd like to use MessageDifferencer, you can do so so long as you include the following dependencies (gradle example given):

    compile "com.google.auto.value:auto-value-annotations:1.7"
    annotationProcessor "com.google.auto.value:auto-value:1.7"

from startup-os.

lan-n-tran avatar lan-n-tran commented on May 27, 2024

@sumitbh250 so you ended up copy the class to your local and updated the dependency like @drather19 mentioned? MessageDifferencer is exactly what I am looking for.

I see there is an open issue here google/truth#656

from startup-os.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.