@@ -104,7 +104,7 @@ function connectToSbt(coursierPath: string): Thenable<rpc.MessageConnection> {
104
104
sbtStatusBar . show ( )
105
105
106
106
return offeringToRetry ( ( ) => {
107
- return withSbtInstance ( outputChannel , coursierPath ) . then ( connection => {
107
+ return withSbtInstance ( coursierPath ) . then ( connection => {
108
108
markSbtUp ( )
109
109
const interval = setInterval ( ( ) => checkSbt ( interval , connection , coursierPath ) , sbtCheckIntervalMs )
110
110
return connection
@@ -216,7 +216,7 @@ function runLanguageServer(coursierPath: string, languageServerArtifactFile: str
216
216
} )
217
217
}
218
218
219
- function startNewSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) {
219
+ function startNewSbtInstance ( coursierPath : string ) {
220
220
fetchWithCoursier ( coursierPath , sbtArtifact ) . then ( ( sbtClasspath ) => {
221
221
sbtProcess = cpp . spawn ( "java" , [
222
222
"-Dsbt.log.noformat=true" ,
@@ -229,25 +229,25 @@ function startNewSbtInstance(log: vscode.OutputChannel, coursierPath: string) {
229
229
sbtProcess . stdin . end ( )
230
230
231
231
sbtProcess . stdout . on ( 'data' , data => {
232
- log . append ( data . toString ( ) )
232
+ outputChannel . append ( data . toString ( ) )
233
233
} )
234
234
sbtProcess . stderr . on ( 'data' , data => {
235
- log . append ( data . toString ( ) )
235
+ outputChannel . append ( data . toString ( ) )
236
236
} )
237
237
} )
238
238
}
239
239
240
240
/**
241
241
* Connects to an existing sbt server, or boots up one instance and connects to it.
242
242
*/
243
- function withSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) : Thenable < rpc . MessageConnection > {
243
+ function withSbtInstance ( coursierPath : string ) : Thenable < rpc . MessageConnection > {
244
244
const serverSocketInfo = path . join ( workspaceRoot , "project" , "target" , "active.json" )
245
245
246
246
if ( ! fs . existsSync ( serverSocketInfo ) ) {
247
- startNewSbtInstance ( log , coursierPath )
247
+ startNewSbtInstance ( coursierPath )
248
248
}
249
249
250
- return sbtserver . connectToSbtServer ( log )
250
+ return sbtserver . connectToSbtServer ( outputChannel )
251
251
}
252
252
253
253
function fetchWithCoursier ( coursierPath : string , artifact : string , extra : string [ ] = [ ] ) {
@@ -305,8 +305,6 @@ function run(serverOptions: ServerOptions) {
305
305
revealOutputChannelOn : RevealOutputChannelOn . Never
306
306
}
307
307
308
- // outputChannel.dispose()
309
-
310
308
const client = new LanguageClient ( 'dotty' , 'Dotty Language Server' , serverOptions , clientOptions ) ;
311
309
312
310
// Push the disposable to the context's subscriptions so that the
0 commit comments