Skip to content

Fix MiMa filters for base version 3.2.1-RC1 #15457

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

Merged
merged 2 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions library/src/scala/annotation/MainAnnotation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ object MainAnnotation:
* @param documentation The documentation of the main method without the `@param` documentation (see Parameter.documentaion)
* @param parameters Information about the parameters of the main method
*/
@experimental // MiMa does not check scope inherited @experimental
final class Info(
val name: String,
val documentation: String,
Expand All @@ -111,6 +112,7 @@ object MainAnnotation:
* @param documentation The documentation of the parameter (from `@param` documentation in the main method)
* @param annotations The annotations of the parameter that extend `ParameterAnnotation`
*/
@experimental // MiMa does not check scope inherited @experimental
final class Parameter(
val name: String,
val typeName: String,
Expand All @@ -121,6 +123,7 @@ object MainAnnotation:
)

/** Marker trait for annotations that will be included in the Parameter annotations. */
@experimental // MiMa does not check scope inherited @experimental
trait ParameterAnnotation extends StaticAnnotation

end MainAnnotation
3 changes: 2 additions & 1 deletion library/src/scala/annotation/newMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ final class newMain extends MainAnnotation[FromString, Any]:
hasParseErrors = true
() => throw new AssertionError("trying to get invalid argument")


@experimental // MiMa does not check scope inherited @experimental
private object Help:

/** The name of the special argument to display the method's help.
Expand Down Expand Up @@ -321,6 +321,7 @@ final class newMain extends MainAnnotation[FromString, Any]:

end Help

@experimental // MiMa does not check scope inherited @experimental
private class Names(info: Info):

checkNames()
Expand Down
17 changes: 15 additions & 2 deletions project/MiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,27 @@ object MiMaFilters {
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.runtime.QuoteUnpickler.unpickleExprV2"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.runtime.QuoteUnpickler.unpickleTypeV2"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.runtime.QuoteUnpickler.unpickleTypeV2"),

ProblemFilters.exclude[MissingClassProblem]("scala.annotation.since"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.TupleMirror"),
ProblemFilters.exclude[MissingTypesProblem]("scala.Tuple$package$EmptyTuple$"), // we made the empty tuple a case object
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.Scala3RunTime.nnFail"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.Scala3RunTime.nnFail"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.LazyVals.getOffsetStatic"), // Added for #14780
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.LazyVals.getOffsetStatic"), // Added for #14780
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.2-migration"),
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.2"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E2$"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E2$minusmigration$"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.coverage.Invoker"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.coverage.Invoker$"),

// APIs will be added in 3.2.0
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#AppliedTypeModule.apply"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#AppliedTypeModule.apply"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.asQuotes"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.typeRef"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.termRef"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TypeTreeModule.ref"),

ProblemFilters.exclude[MissingClassProblem]("scala.annotation.since"),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@ val experimentalDefinitionInLibrary = Set(
// Should we have better support for main annotation macros?
"scala.annotation.MainAnnotation",
"scala.annotation.MainAnnotation$",
"scala.annotation.MainAnnotation$.Info",
"scala.annotation.MainAnnotation$.Parameter",
"scala.annotation.MainAnnotation$.ParameterAnnotation",


//// New feature: prototype of new version of @main
// This will never be stabilized. When it is ready it should replace the old @main annotation (requires scala.annotation.MainAnnotation).
// Needs user feedback.
"scala.annotation.newMain",
"scala.annotation.newMain$",
"scala.annotation.newMain$.alias",
"scala.annotation.newMain.Help",
"scala.annotation.newMain.Help$",
"scala.annotation.newMain.Names",

//// New APIs: Mirror
// Can be stabilized in 3.3.0 or later.
Expand Down