From 930b078129316067c5791aaa49d6fb627a0ac51b Mon Sep 17 00:00:00 2001 From: Aleksander Einarsen <aleksace@stud.ntnu.no> Date: Thu, 10 Oct 2024 11:49:17 +0200 Subject: [PATCH] Marked as deprecated, fixed a code typo for dependencies --- modules/compiler/go-compiler/go_compiler.go | 6 ++++-- modules/compiler/rust-compiler/rust_compiler.go | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/compiler/go-compiler/go_compiler.go b/modules/compiler/go-compiler/go_compiler.go index e5b4d4f..595dc48 100644 --- a/modules/compiler/go-compiler/go_compiler.go +++ b/modules/compiler/go-compiler/go_compiler.go @@ -5,13 +5,15 @@ import ( "runtime" ) +// Deprecated: Use `go_compiler_v2.NewGoCompiler` instead +// // CompileStringToGo tries to compile a string of go code to a go executable, and returns the compiler output and an error. // The function does not produce any executables, since they are deleted after the function ends. -func CompileStringToGo(code string, filename string, dependencies ...string) (string, error) { +func CompileStringToGo(code string, filename string, _ ...string) (string, error) { // Get the platform OS := runtime.GOOS // SetupEnvironment - return compiler.InitCompiler(compiler.OS(OS), compiler.Go, code, filename, dependencies...).Compile() + return compiler.InitCompiler(compiler.OS(OS), compiler.Go, code, filename).Compile() } diff --git a/modules/compiler/rust-compiler/rust_compiler.go b/modules/compiler/rust-compiler/rust_compiler.go index 7564fc0..6e8f2af 100644 --- a/modules/compiler/rust-compiler/rust_compiler.go +++ b/modules/compiler/rust-compiler/rust_compiler.go @@ -5,6 +5,8 @@ import ( "runtime" ) +// Deprecated: Use `rust_compiler_v2.NewRustCompiler` instead +// // CompileStringToRust compiles a string of go code to a rust executable func CompileStringToRust(code string, filename string, dependencies ...string) (string, error) { -- GitLab