ashwanthkumar / suuchi

सूचि - Toolkit to build Distributed Data Systems
https://ashwanthkumar.github.io/suuchi/
53 stars 12 forks source link

Compiler errors on setup #82

Open overfullstack opened 3 years ago

overfullstack commented 3 years ago

Hi! I imported this project into intellij as sbt project and ran sbt compile. I get a lot of compiler errors across the project. Please help me with the steps to setup this repo. Thanks image

ashwanthkumar commented 3 years ago

The import error is mostly because it is generated. Once you do sbt compile (once) you might want to close and re-open IDEA. It might help in seeing the generated_sources under the target folder.

overfullstack commented 3 years ago

I just noticed my sbt compile asked for python and I install v3.9. Now it throws these errors:

My sbt version: 1.4.5 Scala version: 2.11.4 JDK - 1.8 Python - 3.9.1

PS C:\Users\gopalsa> cd .\code-clones\others\suuchi\ PS C:\Users\gopalsa\code-clones\others\suuchi> sbt compile [info] Loading global plugins from C:\Users\gopalsa.sbt\0.13\plugins [info] Updating {file:/C:/Users/gopalsa/.sbt/0.13/plugins/}global-plugins... [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] Loading project definition from C:\Users\gopalsa\code-clones\others\suuchi\project [info] Updating {file:/C:/Users/gopalsa/code-clones/others/suuchi/project/}suuchi-build... [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] Compiling 1 Scala source to C:\Users\gopalsa\code-clones\others\suuchi\project\target\scala-2.10\sbt-0.13\classes... [info] Set current project to suuchi (in build file:/C:/Users/gopalsa/code-clones/others/suuchi/) [info] Updating {file:/C:/Users/gopalsa/code-clones/others/suuchi/}suuchi... [info] Resolving org.scala-lang#scala-compiler;2.10.6 ... [info] Compiling 25 Scala sources to C:\Users\gopalsa\code-clones\others\suuchi\suuchi-core\target\scala-2.11\classes...[info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] Compiling 1 protobuf files to C:\Users\gopalsa\code-clones\others\suuchi\suuchi-examples\target\protobuf-generated [info] Compiling schema C:\Users\gopalsa\code-clones\others\suuchi\suuchi-examples\src\main\protobuf\example.proto protoc-jar: protoc version: 340, detected platform: windows 10/amd64 [info] 'compiler-interface' not yet compiled for Scala 2.11.11. Compiling... protoc-jar: executing: [C:\Users\gopalsa\AppData\Local\Temp\protocjar7452431029208566819\bin\protoc.exe, --plugin=protoc-gen-scala=C:\Users\gopalsa\AppData\Local\Temp\protocbridge1939729815424270791.bat, --scala_out=flat_package,grpc:C:\Users\gopalsa\code-clones\others\suuchi\suuchi-examples\target\protobuf-generated, -IC:\Users\gopalsa\code-clones\others\suuchi\suuchi-examples\src\main\protobuf, -IC:\Users\gopalsa\code-clones\others\suuchi\suuchi-examples\target\protobuf_external, C:\Users\gopalsa\code-clones\others\suuchi\suuchi-examples\src\main\protobuf\example.proto] Traceback (most recent call last): File "C:\Users\gopalsa\AppData\Local\Temp\protocbridge5622614986309977588.py", line 6, in s.sendall(content) TypeError: a bytes-like object is required, not 'str' --scala_out: protoc-gen-scala: Plugin failed with status code 1. [info] Compilation completed in 12.786 s [warn] C:\Users\gopalsa\code-clones\others\suuchi\suuchi-core\src\main\scala\in\ashwanthkumar\suuchi\router\RoutingStrategy.scala:38: a pattern match on a refinement type is unchecked [warn] case msg: RoutingStrategy.WithKey => [warn] ^ [warn] C:\Users\gopalsa\code-clones\others\suuchi\suuchi-core\src\main\scala\in\ashwanthkumar\suuchi\router\RoutingStrategy.scala:50: a pattern match on a refinement type is unchecked [warn] case msg: RoutingStrategy.WithKey => partitioner.find(msg.getKey.toByteArray, nrReplicas) [warn] ^ [warn] two warnings found [info] Compiling 2 Scala sources to C:\Users\gopalsa\code-clones\others\suuchi\suuchi-cluster-atomix\target\scala-2.11\classes... [info] Compiling 2 Scala sources to C:\Users\gopalsa\code-clones\others\suuchi\suuchi-cluster-scalecube\target\scala-2.11\classes... [info] Compiling 2 Scala sources to C:\Users\gopalsa\code-clones\others\suuchi\suuchi-rocksdb\target\scala-2.11\classes... [warn] there was one deprecation warning; re-run with -deprecation for details [warn] one warning found java.lang.RuntimeException: protoc returned exit code: 1 at scala.sys.package$.error(package.scala:27) at sbtprotoc.ProtocPlugin$.sbtprotoc$ProtocPlugin$$compile(ProtocPlugin.scala:139) at sbtprotoc.ProtocPlugin$$anonfun$sourceGeneratorTask$1.sbtprotoc$ProtocPlugin$$anonfun$$compileProto$1(ProtocPlugin.scala:172) at sbtprotoc.ProtocPlugin$$anonfun$sourceGeneratorTask$1$$anonfun$5.apply(ProtocPlugin.scala:184) at sbtprotoc.ProtocPlugin$$anonfun$sourceGeneratorTask$1$$anonfun$5.apply(ProtocPlugin.scala:183) at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:235) at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:235) at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:249) at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:245) at sbt.Difference.apply(Tracked.scala:224) at sbt.Difference.apply(Tracked.scala:206) at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:245) at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:244) at sbt.Difference.apply(Tracked.scala:224) at sbt.Difference.apply(Tracked.scala:200) at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:244) at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:242) at sbtprotoc.ProtocPlugin$$anonfun$sourceGeneratorTask$1.apply(ProtocPlugin.scala:190) at sbtprotoc.ProtocPlugin$$anonfun$sourceGeneratorTask$1.apply(ProtocPlugin.scala:164) at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40) at sbt.std.Transform$$anon$4.work(System.scala:63) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228) at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17) at sbt.Execute.work(Execute.scala:237) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228) at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159) at sbt.CompletionService$$anon$2.call(CompletionService.scala:28) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [error] (examples/compile:protocGenerate) protoc returned exit code: 1 [error] Total time: 23 s, completed Jan 19, 2021 9:38:01 PM PS C:\Users\gopalsa\code-clones\others\suuchi>