Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions vscode-dotty/src/tracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,15 @@ export class Tracer {

run(): vscode.OutputChannel | undefined {
const consentCommandDisposable = vscode.commands.registerCommand(consentCommandName, () => this.askForTracingConsent())
if (this.isTracingEnabled) {
if (this.tracingConsent.get() === 'no-answer') this.askForTracingConsent()
this.initializeAsyncWorkspaceDump()

const lspOutputChannel = this.createLspOutputChannel()
const statusBarItem = this.createStatusBarItem()
for (const disposable of [consentCommandDisposable, lspOutputChannel, statusBarItem]) {
if (disposable) this.ctx.extensionContext.subscriptions.push(disposable)
}
return lspOutputChannel
if (this.isTracingEnabled && this.tracingConsent.get() === 'no-answer') this.askForTracingConsent()
this.initializeAsyncWorkspaceDump()

const lspOutputChannel = this.createLspOutputChannel()
const statusBarItem = this.createStatusBarItem()
for (const disposable of [consentCommandDisposable, lspOutputChannel, statusBarItem]) {
if (disposable) this.ctx.extensionContext.subscriptions.push(disposable)
}
return lspOutputChannel
}

private askForTracingConsent(): void {
Expand All @@ -111,7 +109,7 @@ export class Tracer {

private initializeAsyncWorkspaceDump() {
const url = this.remoteWorkspaceDumpUrl
if (url === undefined) return
if (!url) return

const doInitialize = () => {
try {
Expand Down