Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions project/MimaExcludes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ object MimaExcludes {
MimaBuild.excludeSparkClass("streaming.flume.FlumeTestUtils") ++
MimaBuild.excludeSparkClass("streaming.flume.PollingFlumeTestUtils") ++
Seq(
ProblemFilters.exclude[MissingMethodProblem](
"org.apache.spark.ml.classification.LogisticCostFun.this"),
ProblemFilters.exclude[MissingMethodProblem](
"org.apache.spark.ml.classification.LogisticAggregator.add"),
ProblemFilters.exclude[MissingMethodProblem](
"org.apache.spark.ml.classification.LogisticAggregator.count"),
// MiMa does not deal properly with sealed traits
ProblemFilters.exclude[MissingMethodProblem](
"org.apache.spark.ml.classification.LogisticRegressionSummary.featuresCol")
) ++ Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ object GenerateMIMAIgnore {
val classSymbol = mirror.classSymbol(Class.forName(className, false, classLoader))
val moduleSymbol = mirror.staticModule(className)
val directlyPrivateSpark =
isPackagePrivate(classSymbol) || isPackagePrivateModule(moduleSymbol)
isPackagePrivate(classSymbol) ||
isPackagePrivateModule(moduleSymbol) ||
classSymbol.isPrivate ||
classSymbol.isProtected

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also added protected here though; I'm not sure that's safe to exclude from checks.

The point is that some previous excludes are now caught by the new isPrivate check and ignored?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking the scala specs, the protected modifier only affects methods, not classes. I am removing it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About your previous question, yes, isPrivate catches some classes that we did not catch previously (because we were checking for package-private classes, not private classes).

val developerApi = isDeveloperApi(classSymbol) || isDeveloperApi(moduleSymbol)
val experimental = isExperimental(classSymbol) || isExperimental(moduleSymbol)
/* Inner classes defined within a private[spark] class or object are effectively
Expand Down