You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2020/06/25 16:04:15 UTC

[GitHub] [incubator-daffodil] jw3 opened a new pull request #393: Add scalac warnings for unused imports

jw3 opened a new pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393


   - cleans up unused imports using scalafix
   - enables scalac option -Ywarn-unused:imports
   
   DAFFODIL-2145
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] tuxji commented on pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
tuxji commented on pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#issuecomment-649757805


   Looks good to me.
   
   I followed the [scala/bug#11467](https://github.com/scala/bug/issues/11467) link, wondered who sjrd was, googled, found out he authored Scala.js, browsed his Twitter page, and learned about some interesting stuff including [scalafix-organize-imports](https://github.com/liancheng/scalafix-organize-imports).  Seems even more powerful than scalafix's RemoveUnused rule since it organizes all imports nicely into groups, although only one or the other rule should be used.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] jw3 commented on pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
jw3 commented on pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#issuecomment-650148766


   It needs squashed some.  Do you want two commits with the build.sbt changes left separate, or squash it all into one?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] jw3 commented on a change in pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
jw3 commented on a change in pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#discussion_r445735701



##########
File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/udf/UserDefinedFunctionService.scala
##########
@@ -28,7 +28,6 @@ import java.lang.reflect.Method
 import org.apache.daffodil.dpath.NodeInfo
 import java.io.Serializable
 import java.io.ObjectInputStream
-import scala.language.existentials

Review comment:
       Had to add a language feature flag for 2.11 due to the import being seen as unused in 2.12
     - See https://github.com/scala/bug/issues/11467




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] jw3 commented on a change in pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
jw3 commented on a change in pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#discussion_r445735701



##########
File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/udf/UserDefinedFunctionService.scala
##########
@@ -28,7 +28,6 @@ import java.lang.reflect.Method
 import org.apache.daffodil.dpath.NodeInfo
 import java.io.Serializable
 import java.io.ObjectInputStream
-import scala.language.existentials

Review comment:
       Added language feature flag for 2.11 to resolve cross version conflict here
     - See https://github.com/scala/bug/issues/11467




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] stevedlawrence commented on pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#issuecomment-650162354


   I think one commit is fine in this case. It's maybe a little difficult for the important build.sbt change to stand out, but it is usually going to be the first file listed in a diff so it's not too hidden.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] tuxji merged pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
tuxji merged pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] jw3 commented on pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
jw3 commented on pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#issuecomment-649662114


   Ah, yeah will need separate options for 2.11...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] tuxji commented on pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
tuxji commented on pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#issuecomment-650182187


   +1  Steve encouraged me to try out my committer bit :-).
   
   Once your squashed commit passes the checks, I'll see if I can merge your commit too.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-daffodil] jw3 commented on a change in pull request #393: Add scalac warnings for unused imports

Posted by GitBox <gi...@apache.org>.
jw3 commented on a change in pull request #393:
URL: https://github.com/apache/incubator-daffodil/pull/393#discussion_r445735701



##########
File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/udf/UserDefinedFunctionService.scala
##########
@@ -28,7 +28,6 @@ import java.lang.reflect.Method
 import org.apache.daffodil.dpath.NodeInfo
 import java.io.Serializable
 import java.io.ObjectInputStream
-import scala.language.existentials

Review comment:
       Added language feature flag for 2.11 due to the import being seen as unused in 2.12
     - See https://github.com/scala/bug/issues/11467




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org