GoogleCloudPlatform / cloud-opensource-java

Tools for detecting and avoiding linkage errors in GCP open source projects
Apache License 2.0
157 stars 74 forks source link

Group linkage error info in plugin #576

Open elharo opened 5 years ago

elharo commented 5 years ago

Currently it looks something like this:

mockito-core-2.18.0.jar (2 errors): org.mockito.internal.creation.bytebuddy.MockMethodDispatcher is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForReadObject org.mockito.internal.creation.bytebuddy.MockMethodDispatcher is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForEquals org.mockito.internal.creation.bytebuddy.MockMethodDispatcher is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$SerializableRealMethodCall org.mockito.internal.creation.bytebuddy.MockMethodDispatcher is not found, referenced from org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator org.mockito.internal.creation.bytebuddy.MockMethodDispatcher is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice org.mockito.internal.creation.bytebuddy.MockMethodDispatcher is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForHashCode org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.get is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForReadObject org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.get is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForEquals org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.isMock is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForEquals org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.get is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$SerializableRealMethodCall org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.set is not found, referenced from org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator org.mockito.internal.creation.bytebuddy.MockMethodDispatcher. is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.get is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.isMocked is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.isOverridden is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.handle is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.get is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForHashCode org.mockito.internal.creation.bytebuddy.MockMethodDispatcher.isMock is not found, referenced from org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForHashCode

  1. We should organize this a little better when the same missing method is found with multiple sources. E.g.

    mockito-core-2.18.0.jar (2 errors): org.mockito.internal.creation.bytebuddy.MockMethodDispatcher is not found, referenced from

    • org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForReadObject
    • org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForEquals
    • org.mockito.internal.creation.bytebuddy.MockMethodAdvice$SerializableRealMethodCall
      • org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator
      • org.mockito.internal.creation.bytebuddy.MockMethodAdvice *org.mockito.internal.creation.bytebuddy.MockMethodAdvice$ForHashCode
  2. Furthermore, when an entire class is not found, as here, we don't need to bother printing individual missing method and missing field errors from that class.

damanBirSingh commented 3 years ago

Hello, I am new to open source and would love to contribute. I am an ME student at Bits Pilani, Goa, India and have some experience in Java. At the moment I will try to build the project on my machine. Is there anything I need to know to reproduce this locally?

elharo commented 3 years ago

I don't think anyone here has much availability to mentor students. I suspect this bug is within reach for an advanced undergraduate who's familiar with JUnit and TDD. Start with the readme, look at the output in the dashboard, and check out and build the code. If you can do that, I can point you at the code you might want ot start with. However if any of that requires assistance, then this project likely isn't the best place for you to start.

damanBirSingh commented 3 years ago

Thanks for the reply. Yes, I am familiar with Junit and have worked on it. Sure, I will look at the readme and try my best to get build up and running and get back to you.

damanBirSingh commented 3 years ago

I was able to build the code successfully, could you please point me to the code, so I can start working on this. Thank you. image

elefeint commented 3 years ago

@damanBirSingh Reproducing the issue and finding the code responsible would be the first step to fixing it. This is frequently the hardest part of the task!