-
Notifications
You must be signed in to change notification settings - Fork 231
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
macros-generated private field forwardReader
never has usages
#641
Comments
forwardReader
that never has usagesforwardReader
never has usages
forwardReader
never has usagesforwardReader
never has usages
I can throw in a simple PR with a fix. |
Hi, This lazy variable is indeed use in some case of recursive types, so it cannot be "just" removed. |
@cchantep thanks for the response! Where is it used? I only see definitions: https://github.com/ReactiveMongo/ReactiveMongo/search?utf8=%E2%9C%93&q=forwardWriter&type= |
|
Thanks, now I see it (deeply hidden). Sorry for that. Will use the ML. |
Hi. The current implementation of
Macros.handler
,Macros.reader
,Macros.writer
define unused fieldsforwardReader
andforwardWriter
. They should be deleted (to reduce jar sizes, to make scalac warnings go away and to remove dead code from the code base).ReactiveMongo Version 0.12.1
Also, same code in the master branch here: https://github.com/ReactiveMongo/ReactiveMongo/blob/master/macros/src/main/scala-2.12/MacroImpl.scala#L11
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
Expected Behavior
No dead code in macro-generated code. No scalac warnings on unused private variables
case class C(i: Int)
scalac
flag"-Ywarn-unused"
Actual Behavior
scalac shows warnings on unused private variable. The variable really has no usages in any imaginable scenario. There's just a private val defined without usages.
Reproducible Test Case
see above
The text was updated successfully, but these errors were encountered: