@@ -36,7 +36,6 @@ type INOLanguageServer struct {
36
36
closing chan bool
37
37
clangdStarted * sync.Cond
38
38
dataMux sync.RWMutex
39
- compileCommandsDir * paths.Path
40
39
buildPath * paths.Path
41
40
buildSketchRoot * paths.Path
42
41
buildSketchCpp * paths.Path
@@ -123,12 +122,6 @@ func NewINOLanguageServer(stdin io.Reader, stdout io.Writer, config *Config) *IN
123
122
ls .clangdStarted = sync .NewCond (& ls .dataMux )
124
123
ls .sketchRebuilder = NewSketchBuilder (ls )
125
124
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
-
132
125
if tmp , err := paths .MkTempDir ("" , "arduino-language-server" ); err != nil {
133
126
log .Fatalf ("Could not create temp folder: %s" , err )
134
127
} else {
@@ -139,7 +132,6 @@ func NewINOLanguageServer(stdin io.Reader, stdout io.Writer, config *Config) *IN
139
132
logger .Logf ("Initial board configuration: %s" , ls .config .Fqbn )
140
133
logger .Logf ("Language server build path: %s" , ls .buildPath )
141
134
logger .Logf ("Language server build sketch root: %s" , ls .buildSketchRoot )
142
- logger .Logf ("Language server compile-commands: %s" , ls .compileCommandsDir .Join ("compile_commands.json" ))
143
135
144
136
ls .IDE = NewIDELSPServer (logger , stdin , stdout , ls )
145
137
ls .progressHandler = NewProgressProxy (ls .IDE .conn )
@@ -174,10 +166,6 @@ func (ls *INOLanguageServer) InitializeReqFromIDE(ctx context.Context, logger js
174
166
return
175
167
}
176
168
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
-
181
169
if inoCppContent , err := ls .buildSketchCpp .ReadFile (); err == nil {
182
170
ls .sketchMapper = sourcemapper .CreateInoMapper (inoCppContent )
183
171
ls .sketchMapper .CppText .Version = 1
@@ -1342,9 +1330,6 @@ func (ls *INOLanguageServer) Close() {
1342
1330
if ls .buildPath != nil {
1343
1331
ls .buildPath .RemoveAll ()
1344
1332
}
1345
- if ls .compileCommandsDir != nil {
1346
- ls .compileCommandsDir .RemoveAll ()
1347
- }
1348
1333
}
1349
1334
1350
1335
// CloseNotify returns a channel that is closed when the InoHandler is closed
0 commit comments