Skip to content
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

Failed to compile custom identifier plugin #242

Closed
zillani opened this issue Jan 8, 2019 · 2 comments
Closed

Failed to compile custom identifier plugin #242

zillani opened this issue Jan 8, 2019 · 2 comments

Comments

@zillani
Copy link
Contributor

zillani commented Jan 8, 2019

HelloWorldIdentifierConfig.scala fails to compile.
issue-type: bug
scala version: 2.12.2
JVM: 8
steps to reproduce:

  • clone linkerd-examples
  • cd plugins
  • ./sbt headerClassifier/assembly

Error log:

[error] /root/linkerd-official/linkerd-examples/plugins/header-classifier/src/main/scala/io/buoyant/http/identifiers/HelloWorldIdentifierConfig.scala:10: class HelloWorldIdentifierConfig needs to be abstract, since method newIdentifier in class HttpIdentifierConfig of type (prefix: com.twitter.finagle.Path, baseDtab: () => com.twitter.finagle.Dtab, routerParams: com.twitter.finagle.Stack.Params)io.buoyant.router.RoutingFactory.Identifier[com.twitter.finagle.http.Request] is not defined
[error] class HelloWorldIdentifierConfig extends HttpIdentifierConfig{
[error]       ^
[error] /root/linkerd-official/linkerd-examples/plugins/header-classifier/src/main/scala/io/buoyant/http/identifiers/HelloWorldIdentifierConfig.scala:15: method newIdentifier overrides nothing.
[error] Note: the super classes of class HelloWorldIdentifierConfig contain the following, non final members named newIdentifier:
[error] def newIdentifier(prefix: com.twitter.finagle.Path,baseDtab: () => com.twitter.finagle.Dtab,routerParams: com.twitter.finagle.Stack.Params): io.buoyant.router.RoutingFactory.Identifier[com.twitter.finagle.http.Request]
[error]   override def newIdentifier(prefix: Path, baseDtab: () => Dtab): Identifier[Request] = {
[error]                ^
[error] two errors found
@zillani
Copy link
Contributor Author

zillani commented Jan 8, 2019

The Issue occurred due to this change,
linkerd/linkerd@6828f31#diff-f1d21d8c3cca2d585850659be8bcc174
Thanks to @dadjeibaah for addressing this!

dadjeibaah pushed a commit that referenced this issue Jan 8, 2019
Updated newIdentifier as per new signature (#242)
@dadjeibaah
Copy link
Contributor

Issue fixed by #243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants