-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-2497] Included checks for module symbols too. #1463
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
Conversation
|
QA tests have started for PR 1463. This patch merges cleanly. |
|
QA results for PR 1463: |
|
@ScrapCodes could you explain a bit more how this fixes SPARK-2497. If I look at the original false-positive the issue reported was not with a companion class. It was actually in a method of the object itself. Also the method was annotated, not the object. |
|
@pwendell The reason I did this is, if you compile a file A.scala with contents @SomeAnnotation
object Ait will produce two class files A.class and A$.class. And I don't understand why scala reflection does not detect the annotation on A.class, it only detects it on A$.class. This was the reason for doing this change. The impact of this change is that, when we see annotation on a class we assume it is also present on its companion. I am spending a little more time on this maybe something better can be done. |
|
Also according to current code flow we don't check methods if we spot an annotation on a class. I can remove this restriction if you are okay with it. |
|
QA tests have started for PR 1463. This patch merges cleanly. |
|
QA results for PR 1463: |
|
In your example, the reason why there is no annotation on the Will you see the annotation on both? I this current approach will cause false negatives in the following situation: In this case changes to the |
|
I changed the patch to first check for presence of annotation on class and then on object using separate |
…ass itself is excluded or not.
|
QA tests have started for PR 1463. This patch merges cleanly. |
|
QA results for PR 1463: |
|
Hey @ScrapCodes sorry I was misunderstanding what you were saying. You are just trying to reflect on the sybmol as both a class and a module. |
|
Thanks @ScrapCodes I think I understand this all now. I'll merge this. |
Author: Prashant Sharma <[email protected]> Closes apache#1463 from ScrapCodes/SPARK-2497/mima-exclude-all and squashes the following commits: 72077b1 [Prashant Sharma] Check separately for module symbols. cd96192 [Prashant Sharma] SPARK-2497 Produce "member excludes" irrespective of the fact that class itself is excluded or not.
No description provided.