Duhemm commented on code in PR #1125:
URL: https://github.com/apache/incubator-pekko/pull/1125#discussion_r1492174440


##########
project/Protobuf.scala:
##########
@@ -38,7 +38,7 @@ object Protobuf {
     outputPaths := Seq((Compile / sourceDirectory).value, (Test / 
sourceDirectory).value).map(_ / "java"),
     importPath := None,
     // this keeps intellij happy for files that use the shaded protobuf
-    Compile / unmanagedJars += (LocalProject("protobuf-v3") / assembly).value,
+    Compile / unmanagedJars += (LocalProject("protobuf-v3") / Compile / 
packageBin).value,

Review Comment:
   `Compile / packagebin` is cached, whereas `assembly` is not. Both tasks 
produce the same output:
   
   On main:
   ```
   pekko > show protobuf-v3 / Compile / assembly
   (...)
       [info] 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+329-231b9a99-SNAPSHOT.jar
   $ md5sum < 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+329-231b9a99-SNAPSHOT.jar
   87fdacb73c114cf95d088cb31c164622  -
   
   pekko > show protobuf-v3 / Compile / packageBin
   (...)
       [info] 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+329-231b9a99-SNAPSHOT.jar
   $ md5sum < 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+329-231b9a99-SNAPSHOT.jar
   87fdacb73c114cf95d088cb31c164622  -
   ```
   
   With this pull request:
   ```
   pekko > show protobuf-v3 / Compile / assembly
   (...)
       [info] 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+330-f4e48f91-SNAPSHOT.jar
   $ md5sum < 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+330-f4e48f91-SNAPSHOT.jar
   aec27c8ab1a2dd13fa5b2f15044089d1  -
   
   pekko > show protobuf-v3 / Compile / packageBin
   (...)
       [info] 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+330-f4e48f91-SNAPSHOT.jar
   $ md5sum < 
/Users/martin/Documents/Projects.nosync/apache/incubator-pekko/protobuf-v3/target/scala-2.13/stripped/stripped/pekko-protobuf-v3-assembly-1.1.0-M0+330-f4e48f91-SNAPSHOT.jar
   aec27c8ab1a2dd13fa5b2f15044089d1  -
   ```
   
   So depending on `packageBin` rather than `assembly` should produce the same 
result without requiring to re-build the jar over and over again.
   
   What's your concern with this change?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to