You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/11/18 20:10:20 UTC

[GitHub] [beam] pabloem commented on a change in pull request #15992: [BEAM-13152] [BEAM-13163] [Playground] Run Go code

pabloem commented on a change in pull request #15992:
URL: https://github.com/apache/beam/pull/15992#discussion_r752588394



##########
File path: playground/backend/internal/fs_tool/java_fs.go
##########
@@ -24,39 +24,21 @@ import (
 )
 
 const (
-	javaBaseFileFolder          = "executable_files"
-	javaExecutableFileExtension = "java"
-	javaCompiledFileExtension   = "class"
-	javaSourceFolderName        = "src"
-	javaCompiledFolderName      = "bin"
+	javaExecutableFileExtension = ".java"

Review comment:
       I feel silly thatI missed this - but the executable in java is `.jar`, right?

##########
File path: playground/backend/configs/SDK_GO.json
##########
@@ -0,0 +1,11 @@
+{
+  "compile_cmd": "go",
+  "run_cmd": "",

Review comment:
       we don't need the run command here, right? we obtain a natively executable file, so we just run the output file?

##########
File path: playground/backend/cmd/server/controller.go
##########
@@ -50,7 +50,7 @@ func (controller *playgroundController) RunCode(ctx context.Context, info *pb.Ru
 		return nil, errors.InvalidArgumentError("Run code()", "incorrect sdk: "+info.Sdk.String())
 	}
 	switch info.Sdk {
-	case pb.Sdk_SDK_UNSPECIFIED, pb.Sdk_SDK_GO, pb.Sdk_SDK_PYTHON, pb.Sdk_SDK_SCIO:
+	case pb.Sdk_SDK_UNSPECIFIED, pb.Sdk_SDK_PYTHON, pb.Sdk_SDK_SCIO:

Review comment:
       yohoo : )

##########
File path: playground/backend/internal/fs_tool/fs.go
##########
@@ -29,15 +29,15 @@ const (
 )
 
 // Folder contains names of folders with executable and compiled files.
-// For each SDK these values should be set depending on folders that need for the SDK (/src and /bin for java SDK).
+// For each SDK these values should be set depending on folders that need for the SDK.

Review comment:
       can we keep the /src and /bin for java comment? This helps readers get an idea of what the `Folder` struct holds - otherwise it's hard to tell.




-- 
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: github-unsubscribe@beam.apache.org

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