Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Self-healing-LLM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ammar Ahmed
Self-healing-LLM
Commits
947a8775
Commit
947a8775
authored
9 months ago
by
Aleksander Einarsen
Browse files
Options
Downloads
Patches
Plain Diff
#56
Removed commented code
parent
6f0503ef
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/compiler/compiler.go
+8
-29
8 additions, 29 deletions
modules/compiler/compiler.go
with
8 additions
and
29 deletions
modules/compiler/compiler.go
+
8
−
29
View file @
947a8775
...
...
@@ -47,6 +47,13 @@ type ICompiler interface {
Compile
()
(
string
,
error
)
}
type
ILanguageEnvironment
interface
{
SetupEnvironment
(
cmdPrefix
string
,
dependencies
[]
string
)
CheckCompileErrors
(
filename
string
,
language
Language
,
cmdPrefix
string
)
(
string
,
error
)
WriteCodeToFile
(
filename
,
sourceCode
string
)
error
RunPipeline
(
c
*
Compiler
)
(
string
,
error
)
}
type
GoEnvironment
struct
{
}
...
...
@@ -141,13 +148,6 @@ func getLanguageEnv(language Language) ILanguageEnvironment {
}
}
type
ILanguageEnvironment
interface
{
SetupEnvironment
(
cmdPrefix
string
,
dependencies
[]
string
)
CheckCompileErrors
(
filename
string
,
language
Language
,
cmdPrefix
string
)
(
string
,
error
)
WriteCodeToFile
(
filename
,
sourceCode
string
)
error
RunPipeline
(
c
*
Compiler
)
(
string
,
error
)
}
type
RustEnvironment
struct
{
}
...
...
@@ -220,6 +220,7 @@ func (re *RustEnvironment) WriteCodeToFile(_, sourceCode string) error {
}
/*
Compile compiles the source code and returns the output and an error.
The compiler pipeline
1. Set up OS and Language
2. Set up the temp folders
...
...
@@ -227,28 +228,6 @@ The compiler pipeline
4. SetupEnvironment the code
5. Return the output and error
*/
//func (c *Compiler) Compile() (string, error) {
// // Set up temp folders
// setupTempFolders(TempOutputDir)
// defer removeTempFolders(TempOutputDir)
//
// srcCodeFilename := TempOutputDir + appendSuffix(c.Filename, c.Language)
// //compiledFilename := TempOutputDir + c.Filename
//
// // SetupEnvironment either Go or Rust environment, should be an interface method
// c.languageEnv.SetupEnvironment(c.cmdPrefix, c.Dependencies)
//
// // Write the source code to a file
// err := c.languageEnv.WriteCodeToFile(srcCodeFilename, c.SourceCode)
// if err != nil {
// log.Fatalf("Error writing source code to file: %v", err)
// }
//
// // CheckCompileErrors the code
// return c.languageEnv.CheckCompileErrors(c.Filename, c.Language, c.cmdPrefix)
//}
func
(
c
*
Compiler
)
Compile
()
(
string
,
error
)
{
// Set up temp folders
setupTempFolders
(
TempOutputDir
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment