Skip to content

Usage of implicit method attributeKey defined in object JavaMapping, which is not accessible here #1056

@xuwei-k

Description

@xuwei-k

Steps

build.sbt

scalaVersion := "3.8.4"

val pekkoVersion = "2.0.0-M3"

libraryDependencies ++= Seq(
  "org.apache.pekko" %% "pekko-actor-typed" % pekkoVersion,
  "org.apache.pekko" %% "pekko-stream" % pekkoVersion,
  "org.apache.pekko" %% "pekko-http" % "2.0.0-M1"
)

scalacOptions += "-deprecation"

project/build.properties

sbt.version=1.12.11

A.scala

import org.apache.pekko.http.scaladsl.model.HttpRequest
import org.apache.pekko.http.scaladsl.model.AttributeKeys

class A {
  def b(request: HttpRequest) = request.attribute(AttributeKeys.remoteAddress)
}

Problem

[warn] 5 |  def b(request: HttpRequest) = request.attribute(AttributeKeys.remoteAddress)
[warn]   |                                                                              ^
[warn]   |Usage of implicit method attributeKey defined in object JavaMapping, which is not accessible here. In Scala 3.10, this implicit will no longer be found.

Note

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions