33 * SPDX-License-Identifier: Apache-2.0
44 */
55
6+ import * as vscode from 'vscode'
67import { getLogger } from '../logger/logger'
78import { ToolkitError } from '../errors'
89import { Timeout } from '../utilities/timeoutUtils'
@@ -60,7 +61,9 @@ export class ManifestResolver {
6061 } ) . getNewETagContent ( this . getEtag ( ) )
6162
6263 if ( ! resp . content ) {
63- throw new ToolkitError ( 'New content was not downloaded; fallback to the locally stored manifest' )
64+ throw new ToolkitError (
65+ `New content was not downloaded; fallback to the locally stored ${ this . lsName } manifest`
66+ )
6467 }
6568
6669 const manifest = this . parseManifest ( resp . content )
@@ -71,12 +74,12 @@ export class ManifestResolver {
7174 }
7275
7376 private async getLocalManifest ( ) : Promise < Manifest > {
74- logger . info ( ' Failed to download latest LSP manifest. Falling back to local manifest.' )
77+ logger . info ( ` Failed to download latest ${ this . lsName } manifest. Falling back to local manifest.` )
7578 const storage = this . getStorage ( )
7679 const manifestData = storage [ this . lsName ]
7780
7881 if ( ! manifestData ?. content ) {
79- throw new ToolkitError ( ' Failed to download LSP manifest and no local manifest found.' )
82+ throw new ToolkitError ( ` Failed to download ${ this . lsName } manifest and no local manifest found.` )
8083 }
8184
8285 const manifest = this . parseManifest ( manifestData . content )
@@ -90,14 +93,16 @@ export class ManifestResolver {
9093 return JSON . parse ( content ) as Manifest
9194 } catch ( error ) {
9295 throw new ToolkitError (
93- `Failed to parse manifest: ${ error instanceof Error ? error . message : 'Unknown error' } `
96+ `Failed to parse ${ this . lsName } manifest: ${ error instanceof Error ? error . message : 'Unknown error' } `
9497 )
9598 }
9699 }
97100
98101 private checkDeprecation ( manifest : Manifest ) : void {
99102 if ( manifest . isManifestDeprecated ) {
100- logger . info ( 'This LSP manifest is deprecated. No future updates will be available.' )
103+ const deprecationMessage = `${ this . lsName } manifest is deprecated. No future updates will be available.`
104+ logger . info ( deprecationMessage )
105+ void vscode . window . showInformationMessage ( deprecationMessage )
101106 }
102107 }
103108
0 commit comments