Skip to content

Commit

Permalink
scala2/scala3 difference scala/scala3#4770 (comment)
Browse files Browse the repository at this point in the history
make mima happy
  • Loading branch information
jtjeferreira committed Jan 30, 2023
1 parent cb88f80 commit fd695a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 47 deletions.
3 changes: 3 additions & 0 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ object BuildSettings {
ProblemFilters.exclude[MissingClassProblem]("play.api.ConfigLoader"),
ProblemFilters.exclude[MissingClassProblem]("play.api.Mode$Test$"),
ProblemFilters.exclude[MissingClassProblem]("play.api.Mode"),
// Scala3 compilation
ProblemFilters.exclude[DirectMissingMethodProblem]("play.api.libs.ws.WSRequest.addHttpHeaders"),
ProblemFilters.exclude[DirectMissingMethodProblem]("play.api.libs.ws.WSRequest.addQueryStringParameters"),
),
(Compile / unmanagedSourceDirectories) += {
val suffix = CrossVersion.partialVersion(scalaVersion.value) match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,46 +35,6 @@ trait WSRequest extends StandaloneWSRequest with WSBodyWritables {
*/
override def withHttpHeaders(headers: (String, String)*): Self

/**
* Returns this request with the given headers, preserving the existing ones.
*
* @param hdrs the headers to be added
*/
//TODO scala3 compiler bug?
/*[error] 21 |case class AhcWSRequest(underlying: StandaloneAhcWSRequest) extends WSRequest with WSBodyWritables {
[error] | ^
[error] |class AhcWSRequest needs to be abstract, since:
[error] |it has 4 unimplemented members.
[error] |/** As seen from class AhcWSRequest, the missing signatures are as follows.
[error] | * For convenience, these are usable as stub implementations.
[error] | */
[error] | override def addHttpHeaders(hdrs: Seq[(String, String)]): AhcWSRequest.this.Self = ???
[error] | override def addQueryStringParameters
[error] | (parameters: Seq[(String, String)]): AhcWSRequest.this.Self = ???
[error] | override def header(name: String): Option[String] = ???
[error] | override def headerValues(name: String): Seq[String] = ???
*/
//override def addHttpHeaders(hdrs: (String, String)*): Self

/**
* Get the value of the header with the specified name. If there are more than one values
* for this header, the first value is returned. If there are no values, than a None is
* returned.
*
* @param name the header name
* @return the header value
*/
//override def header(name: String): Option[String]

/**
* Get all the values of header with the specified name. If there are no values for
* the header with the specified name, than an empty sequence is returned.
*
* @param name the header name.
* @return all the values for this header name.
*/
//override def headerValues(name: String): Seq[String]

/**
* Returns this request with the given query string parameters, adding to the existing ones.
*
Expand All @@ -90,13 +50,6 @@ trait WSRequest extends StandaloneWSRequest with WSBodyWritables {
*/
override def withQueryStringParameters(parameters: (String, String)*): Self

/**
* Returns this request with the given query string parameters, preserving the existing ones.
*
* @param parameters the query string parameters
*/
//override def addQueryStringParameters(parameters: (String, String)*): Self

/**
* Returns this request with the given cookies, preserving the existing ones.
*
Expand Down

0 comments on commit fd695a0

Please sign in to comment.