Closed
Description
Versions used
akka-grpc-gradle-plugin:0.7.1
Expected Behavior
Have it generate the akka grpc files
Actual Behavior
Throws a FileNotFoundException
Relevant logs
> Configure project :interface
[task ':interface:assemble', task ':interface:assembleDist', task ':interface:build', task ':interface:buildDependents', task ':interface:buildEnvironment', task ':interface:buildNeeded', task ':interface:check', task ':interface:classes', task ':interface:clean', task ':interface:compileJava', task ':interface:compileScala', task ':interface:compileTestJava', task ':interface:compileTestScala', task ':interface:components', task ':interface:dependencies', task ':interface:dependencyInsight', task ':interface:dependentComponents', task ':interface:distTar', task ':interface:distZip', task ':interface:help', task ':interface:installDist', task ':interface:jar', task ':interface:javadoc', task ':interface:model', task ':interface:processResources', task ':interface:processTestResources', task ':interface:projects', task ':interface:properties', task ':interface:run', task ':interface:scaladoc', task ':interface:startScripts', task ':interface:tasks', task ':interface:test', task ':interface:testClasses']
> Task :interface:extractIncludeProto UP-TO-DATE
> Task :interface:extractProto UP-TO-DATE
> Task :interface:generateProto FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':interface:generateProto'.
> protoc: stdout: . stderr: D:\interface\src\main\proto: warning: directory does not exist.
D:\interface\app\protobuf: warning: directory does not exist.
D:\interface\app\proto: warning: directory does not exist.
Exception in thread "main" java.io.FileNotFoundException: \Users\<User>\AppData\Local\Temp\akka-grpc-gradle6625443006303105175.log (Het systeem kan het opgegeven pad niet vinden)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:187)
at java.base/java.io.PrintWriter.<init>(PrintWriter.java:208)
at java.base/java.io.PrintWriter.<init>(PrintWriter.java:248)
at akka.grpc.gen.FileLogger.<init>(Logging.scala:35)
at akka.grpc.gen.Main$.$anonfun$logger$1(Main.scala:48)
at scala.Option.map(Option.scala:163)
at akka.grpc.gen.Main$.delayedEndpoint$akka$grpc$gen$Main$1(Main.scala:48)
at akka.grpc.gen.Main$delayedInit$body.apply(Main.scala:14)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1$adapted(App.scala:80)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.App.main(App.scala:80)
at scala.App.main$(App.scala:78)
at akka.grpc.gen.Main$.main(Main.scala:14)
at akka.grpc.gen.Main.main(Main.scala)
--akkaGrpc_out: protoc-gen-akkaGrpc: Plugin failed with status code 1.
Reproducible Test Case
Define a protofile and use the gradle plugin. My configuration:
buildscript {
repositories {
mavenLocal()
gradlePluginPortal()
}
dependencies {
classpath 'gradle.plugin.com.lightbend.akka.grpc:akka-grpc-gradle-plugin:0.7.1'
}
}
plugins {
id 'scala'
id 'application'
}
apply plugin: 'com.lightbend.akka.grpc.gradle'
akkaGrpc {
language = "Scala"
generateClient = false
generateServer = true
}
repositories {
mavenLocal()
mavenCentral()
}
Possible fix
I've created a fix that works for my machine @ https://github.com/hithran/akka-grpc/commit/e8c71936f94c787f79c1654c78557f376b1eae4c
But I'm curious to here if it still works for @mlangc who originally wrote the fix for logging.