@@ -36,7 +36,6 @@ type INOLanguageServer struct {
3636 closing chan bool
3737 clangdStarted * sync.Cond
3838 dataMux sync.RWMutex
39- compileCommandsDir * paths.Path
4039 buildPath * paths.Path
4140 buildSketchRoot * paths.Path
4241 buildSketchCpp * paths.Path
@@ -123,12 +122,6 @@ func NewINOLanguageServer(stdin io.Reader, stdout io.Writer, config *Config) *IN
123122 ls .clangdStarted = sync .NewCond (& ls .dataMux )
124123 ls .sketchRebuilder = NewSketchBuilder (ls )
125124
126- if tmp , err := paths .MkTempDir ("" , "arduino-language-server" ); err != nil {
127- log .Fatalf ("Could not create temp folder: %s" , err )
128- } else {
129- ls .compileCommandsDir = tmp .Canonical ()
130- }
131-
132125 if tmp , err := paths .MkTempDir ("" , "arduino-language-server" ); err != nil {
133126 log .Fatalf ("Could not create temp folder: %s" , err )
134127 } else {
@@ -139,7 +132,6 @@ func NewINOLanguageServer(stdin io.Reader, stdout io.Writer, config *Config) *IN
139132 logger .Logf ("Initial board configuration: %s" , ls .config .Fqbn )
140133 logger .Logf ("Language server build path: %s" , ls .buildPath )
141134 logger .Logf ("Language server build sketch root: %s" , ls .buildSketchRoot )
142- logger .Logf ("Language server compile-commands: %s" , ls .compileCommandsDir .Join ("compile_commands.json" ))
143135
144136 ls .IDE = NewIDELSPServer (logger , stdin , stdout , ls )
145137 ls .progressHandler = NewProgressProxy (ls .IDE .conn )
@@ -174,10 +166,6 @@ func (ls *INOLanguageServer) InitializeReqFromIDE(ctx context.Context, logger js
174166 return
175167 }
176168
177- if err := ls .buildPath .Join ("compile_commands.json" ).CopyTo (ls .compileCommandsDir .Join ("compile_commands.json" )); err != nil {
178- logger .Logf ("ERROR: updating compile_commands: %s" , err )
179- }
180-
181169 if inoCppContent , err := ls .buildSketchCpp .ReadFile (); err == nil {
182170 ls .sketchMapper = sourcemapper .CreateInoMapper (inoCppContent )
183171 ls .sketchMapper .CppText .Version = 1
@@ -1342,9 +1330,6 @@ func (ls *INOLanguageServer) Close() {
13421330 if ls .buildPath != nil {
13431331 ls .buildPath .RemoveAll ()
13441332 }
1345- if ls .compileCommandsDir != nil {
1346- ls .compileCommandsDir .RemoveAll ()
1347- }
13481333}
13491334
13501335// CloseNotify returns a channel that is closed when the InoHandler is closed
0 commit comments