-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-11615] Drop @VisibleForTesting annotation #9585
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
|
May need a bit hint on how style-checker rule should be composed to prevent regression |
|
Here is listing of files where @VisibleForTesting is used: Do we want to remove all occurrences ? |
|
Can you create a JIRA please. @JoshRosen for hints on the style checker. |
|
I can follow classforname rule from scalastyle-config.xml - if we decide that @VisibleForTesting should not be used at all |
|
Test build #45481 has finished for PR 9585 at commit
|
|
What I'd probably do is just ban the import via a string pattern match checker, then replace the existing occurrences with comments or introduce a Spark-specific version of the annotation and use that instead. |
|
Test build #45488 has finished for PR 9585 at commit
|
|
Added a rule in scalastyle-config.xml |
|
Test build #45526 has finished for PR 9585 at commit
|
|
@JoshRosen |
scalastyle-config.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird to have // VisibleForTesting as a comment. I'd say we just put it in the java doc of the method, e.g.
/**
* This method does something...
* Exposed for testing.
*/
For the custom message here I'd just say the annotation is banned or something.
|
Test build #45529 has finished for PR 9585 at commit
|
|
From https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45529/consoleFull : |
|
From https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45532/console : |
scalastyle-config.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: indentation is weird.
|
I kinda like that annotation, much more than a comment in the scaladoc, but well... LGTM. retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be java doc, not scala doc
|
Test build #45557 has finished for PR 9585 at commit
|
Not related to this PR |
|
Test build #45554 has finished for PR 9585 at commit
|
See http://search-hadoop.com/m/q3RTtjpe8r1iRbTj2 for discussion. Summary: addition of VisibleForTesting annotation resulted in spark-shell malfunctioning. Author: tedyu <yuzhihong@gmail.com> Closes #9585 from tedyu/master. (cherry picked from commit 9009175) Signed-off-by: Andrew Or <andrew@databricks.com>
|
Test build #45561 has finished for PR 9585 at commit
|
See http://search-hadoop.com/m/q3RTtjpe8r1iRbTj2 for discussion.
Summary: addition of @VisibleForTesting annotation resulted in spark-shell malfunctioning.