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

server: remove warning on private implicit val #32

Merged
merged 1 commit into from
Jul 10, 2021

Conversation

toshihidetagami
Copy link
Contributor

This pull request removes parts of the server warning (Related to Issue #4 ).

Warnings.

[warn]  [E1] app/controllers/ChannelsController.scala
[warn]       private val messageFormat in object ChannelsController is never used
[warn]       L38:  private implicit val messageFormat: Format[Message] = wrapperFormat[Message, Base64String](Message.apply, _.base64)
[warn]       L38:                       ^
[warn]  [E2] app/controllers/ChannelsController.scala
[warn]       private val channelNameFormat in object ChannelsController is never used
[warn]       L57:  private implicit val channelNameFormat: Format[Channel.Name] = safeWrapperFormat[Channel.Name, String](Channel.Name.from, _.string)
[warn]       L57:                       ^
[warn]  [E3] app/controllers/ChannelsController.scala
[warn]       private val channelSecretFormat in object ChannelsController is never used
[warn]       L58:  private implicit val channelSecretFormat: Format[Channel.Secret] = wrapperFormat[Channel.Secret, String](Channel.Secret.apply, _.string)
[warn]       L58:                       ^
[warn]  [E4] app/controllers/ChannelsController.scala
[warn]       private val peerFormat in object ChannelsController is never used
[warn]       L60:  private implicit val peerFormat: Format[Peer] = new Format[Peer] {
[warn]       L60:   

Solution

Those warnings seem false positive and if you remove the code, it becomes compile error.
By adding -Ywarn-macros:after option, you can remove the warnings.

Reference
scala/bug#10599

@AlexITC AlexITC merged commit 374c2ac into wiringbits:master Jul 10, 2021
@AlexITC
Copy link
Contributor

AlexITC commented Jul 10, 2021

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants