From 22c6e4b0d92ea4556f09291a4d1ed6616f600b24 Mon Sep 17 00:00:00 2001 From: LSTM-Kirigaya <1193466151@qq.com> Date: Wed, 9 Oct 2024 17:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=B8=8B=E8=BD=BD=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/verilog.configuration.json | 3 +- package.json | 5 ++ package.nls.json | 3 +- package.nls.zh-cn.json | 3 +- package.nls.zh-tw.json | 3 +- resources/hdlParser/.gitignore | 2 - resources/hdlParser/index.d.ts | 30 -------- resources/hdlParser/index.js | 112 ----------------------------- src/extension.ts | 9 ++- src/function/hdlDoc/markdown.ts | 5 +- src/function/index.ts | 19 +++-- src/function/lsp/core/index.ts | 55 -------------- src/function/lsp/linter/default.ts | 26 ++++--- src/global/lsp.ts | 3 +- src/hdlParser/common.ts | 17 ++++- src/hdlParser/core.ts | 3 +- src/hdlParser/util.ts | 54 +++++++------- src/monitor/event.ts | 20 ++---- 18 files changed, 95 insertions(+), 277 deletions(-) delete mode 100644 resources/hdlParser/.gitignore delete mode 100644 resources/hdlParser/index.d.ts delete mode 100644 resources/hdlParser/index.js delete mode 100644 src/function/lsp/core/index.ts diff --git a/config/verilog.configuration.json b/config/verilog.configuration.json index 66effd5..580b554 100644 --- a/config/verilog.configuration.json +++ b/config/verilog.configuration.json @@ -17,7 +17,8 @@ {"open":"(", "close":")", "notIn":["string", "comment"]}, {"open":"[", "close":"]", "notIn":["string", "comment"]}, {"open":"{", "close":"}", "notIn":["string", "comment"]}, - {"open":"\"", "close":"\"", "notIn":["string", "comment"]} + {"open":"\"", "close":"\"", "notIn":["string", "comment"]}, + {"open":"begin", "close":"end", "notIn":["string", "comment"]} ], "onTypeFormatting": { "autoFormatTriggerCharacters": ["\n"] diff --git a/package.json b/package.json index 6e79d2c..cf0a107 100644 --- a/package.json +++ b/package.json @@ -551,6 +551,11 @@ "category": "Digital-IDE", "title": "%digital-ide.lsp.systemverilog.linter.pick.title%" }, + { + "command": "digital-ide.digital-lsp.download", + "category": "Digital-IDE", + "title": "%digital-ide.digital-lsp.download.title%" + }, { "command": "digital-ide.vhdl2vlog", "title": "%digital-ide.vhdl2vlog.title%", diff --git a/package.nls.json b/package.nls.json index cfa9ff6..a25c0d0 100644 --- a/package.nls.json +++ b/package.nls.json @@ -47,5 +47,6 @@ "digital-ide.lsp.vhdl.linter.pick.title": "select a diagnostic for vhdl", "digital-ide.lsp.systemverilog.linter.pick.title": "select a diagnostic for systemverilog", "digital-ide.tool.export-filelist.title": "export filelist", - "digital-ide.treeview": "Digital IDE: TreeView" + "digital-ide.treeview": "Digital IDE: TreeView", + "digital-ide.digital-lsp.download.title": "Download Digital LSP" } \ No newline at end of file diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index d57708a..6115ddd 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -47,5 +47,6 @@ "digital-ide.lsp.vhdl.linter.pick.title": "选择 VHDL 的诊断", "digital-ide.lsp.systemverilog.linter.pick.title": "选择 SystemVerilog 的诊断", "digital-ide.tool.export-filelist.title": "导出 filelist", - "digital-ide.treeview": "Digital IDE: 模块树" + "digital-ide.treeview": "Digital IDE: 模块树", + "digital-ide.digital-lsp.download.title": "下载 Digital 语言服务器" } \ No newline at end of file diff --git a/package.nls.zh-tw.json b/package.nls.zh-tw.json index 444479d..348eae6 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -47,5 +47,6 @@ "digital-ide.lsp.vhdl.linter.pick.title": "選擇 VHDL 的診斷", "digital-ide.lsp.systemverilog.linter.pick.title": "選擇 SystemVerilog 的診斷", "digital-ide.tool.export-filelist.title": "導出 filelist", - "digital-ide.treeview": "Digital IDE: 模块树" + "digital-ide.treeview": "Digital IDE: 模块树", + "digital-ide.digital-lsp.download.title": "下载 Digital 语言服务器" } \ No newline at end of file diff --git a/resources/hdlParser/.gitignore b/resources/hdlParser/.gitignore deleted file mode 100644 index 6a8468e..0000000 --- a/resources/hdlParser/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -parser.js -parser.wasm \ No newline at end of file diff --git a/resources/hdlParser/index.d.ts b/resources/hdlParser/index.d.ts deleted file mode 100644 index 25866e8..0000000 --- a/resources/hdlParser/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { RawHdlModule, Macro, RawSymbol, Error } from '../../src/hdlParser/common'; -import type { HdlLangID } from '../../src/global/enum'; - -type AbsPath = string; -type RelPath = string; -type Path = AbsPath | RelPath; - - -export const extensionUrl: string; - -interface Fast { - content: RawHdlModule[] - languageId: string - macro: Macro -} - -interface All { - content: RawSymbol[] - languageId: HdlLangID - macro: Macro - error: Error[] -} - -export function callParser(path: AbsPath, func: number): Promise; -export function vlogFast(path: AbsPath): Promise; -export function vlogAll(path: AbsPath): Promise; -export function vhdlFast(path: AbsPath): Promise; -export function vhdlAll(path: AbsPath): Promise; -export function svFast(path: AbsPath): Promise; -export function svAll(path: AbsPath): Promise; \ No newline at end of file diff --git a/resources/hdlParser/index.js b/resources/hdlParser/index.js deleted file mode 100644 index 725d901..0000000 --- a/resources/hdlParser/index.js +++ /dev/null @@ -1,112 +0,0 @@ -const vscode = require('vscode'); - -const fs = require('fs'); - -const hdlParser = require('./parser'); -const { exit } = require('process'); - -const githubIssueUrl = 'https://github.com/Digital-EDA/Digital-IDE/issues'; -const extensionUrl = 'https://github.com/Digital-EDA/Digital-IDE'; - -const _hdlParser = { - module: null, - tempPath: '/home/hdl_parser', - - async acquire() { - const module = this.module; - if (module) { - return module; - } else { - const _m = await hdlParser(); - this.module = _m; - return _m; - } - } -}; - -const debug = { - acquire: 0, - io: 0, - compute: 0 -}; - -async function callParser(path, func) { - const s1 = Date.now(); - const wasmModule = await _hdlParser.acquire(); - debug.acquire += Date.now() - s1; - - const file = _hdlParser.tempPath; - const fileLength = file.length; - - const s2 = Date.now(); - const source = fs.readFileSync(path, 'utf-8') + '\n'; - wasmModule.FS.writeFile(_hdlParser.tempPath, source, { encoding: 'utf8' }); - debug.io += Date.now() - s2; - - try { - const s3 = Date.now(); - - // hdlparser out - const res = wasmModule.ccall('call_parser', 'string', ['string', 'int', 'int'], [file, fileLength, func]); - // console.log(res); - - debug.compute += Date.now() - s3; - // console.log(path, debug); - return JSON.parse(res); - } catch (error) { - console.log(`errors happen when call wasm, path: ${path}, errors: ${error}, input params: (${path}, ${func})`); - - const dsaSetting = vscode.workspace.getConfiguration('digital-ide.dont-show-again'); - if (dsaSetting.get('propose.issue', false) === true) { - return undefined; - } - const res = await vscode.window.showErrorMessage( - `Errors happen when parsing ${path}. Error: "${error}". Just propose a valuable issue in our github repo 😊`, - { title: 'Go and Propose!', value: true }, - { title: "Don't Show Again", value: false } - ); - if (res && res.value === true) { - vscode.env.openExternal(vscode.Uri.parse(githubIssueUrl)); - } else if (res && res.value === false) { - dsaSetting.update('propose.issue', true, vscode.ConfigurationTarget.Global); - } - - return undefined; - } -} - - -async function vhdlFast(path) { - return await callParser(path, 1); -} - -async function vhdlAll(path) { - return await callParser(path, 2); -} - -async function svFast(path) { - return await callParser(path, 3); -} - -async function svAll(path) { - return await callParser(path, 4); -} - -async function vlogFast(path) { - return await callParser(path, 5); -} - -async function vlogAll(path) { - return await callParser(path, 6); -} - -module.exports = { - vlogFast, - vlogAll, - vhdlFast, - vhdlAll, - svFast, - svAll, - extensionUrl, - callParser -}; \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 80b3ffe..d156e0e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -6,15 +6,14 @@ import { hdlParam } from './hdlParser'; import * as manager from './manager'; import * as func from './function'; import { hdlMonitor } from './monitor'; -import { extensionUrl } from '../resources/hdlParser'; import * as lspClient from './function/lsp-client'; import { refreshArchTree } from './function/treeView'; -async function registerCommand(context: vscode.ExtensionContext) { +async function registerCommand(context: vscode.ExtensionContext, version: string) { func.registerFunctionCommands(context); - func.registerLsp(context); + func.registerLsp(context, version); func.registerToolCommands(context); func.registerFSM(context); func.registerNetlist(context); @@ -42,7 +41,7 @@ async function launch(context: vscode.ExtensionContext) { location: vscode.ProgressLocation.Window, title: t('progress.register-command') }, async () => { - await registerCommand(context); + await registerCommand(context, versionString); }); await lspClient.activate(context, versionString); @@ -83,7 +82,7 @@ async function launch(context: vscode.ExtensionContext) { { title: t('welcome.refuse'), value: false }, ); if (res?.value) { - vscode.env.openExternal(vscode.Uri.parse(extensionUrl)); + vscode.env.openExternal(vscode.Uri.parse('https://github.com/Digital-EDA/Digital-IDE')); } } } diff --git a/src/function/hdlDoc/markdown.ts b/src/function/hdlDoc/markdown.ts index 5f13f1b..2c1d942 100644 --- a/src/function/hdlDoc/markdown.ts +++ b/src/function/hdlDoc/markdown.ts @@ -91,7 +91,6 @@ async function patchComment(path: AbsPath, ports: (HdlModulePort | HdlModulePara inlineComment = inlineComment.substring(2); } ports[i].desc = inlineComment; - console.log(inlineComment); } } @@ -103,8 +102,8 @@ async function patchComment(path: AbsPath, ports: (HdlModulePort | HdlModulePara async function getDocsFromModule(module: HdlModule): Promise { const moduleName = module.name; const portNum = module.ports.length; - const paramNum = module.params.length; - + const paramNum = module.params.length; + // add desc can optimizer in the future version const paramPP = patchComment(module.path, module.params); const portPP = patchComment(module.path, module.ports); diff --git a/src/function/index.ts b/src/function/index.ts index 93a9942..3b987d8 100644 --- a/src/function/index.ts +++ b/src/function/index.ts @@ -1,26 +1,23 @@ import * as vscode from 'vscode'; +import * as path from 'path'; import * as hdlDoc from './hdlDoc'; import * as sim from './sim'; import * as treeView from './treeView'; import * as lspCompletion from './lsp/completion'; -import * as lspDocSymbol from './lsp/docSymbol'; -import * as lspDefinition from './lsp/definition'; -import * as lspHover from './lsp/hover'; import * as lspFormatter from '../../resources/formatter'; import * as lspTranslator from '../../resources/translator'; -import * as lspDocSemantic from './lsp/docSemantic'; import * as lspLinter from './lsp/linter'; import * as tool from './tool'; -import * as lspCore from './lsp/core'; // special function import * as FSM from './fsm'; import * as Netlist from './netlist'; import * as WaveView from './dide-viewer'; import { ModuleDataItem } from './treeView/tree'; +import { downloadLsp } from './lsp-client'; function registerDocumentation(context: vscode.ExtensionContext) { vscode.commands.registerCommand('digital-ide.hdlDoc.showWebview', hdlDoc.showDocWebview); @@ -59,7 +56,16 @@ function registerTreeView(context: vscode.ExtensionContext) { vscode.commands.registerCommand('digital-ide.treeView.arch.openFile', treeView.openFileByUri); } -function registerLsp(context: vscode.ExtensionContext) { +function registerLsp(context: vscode.ExtensionContext, version: string) { + + // lsp download + vscode.commands.registerCommand('digital-ide.digital-lsp.download', () => { + const versionFolderPath = context.asAbsolutePath( + path.join('resources', 'dide-lsp', 'server', version) + ); + downloadLsp(context, version, versionFolderPath) + }); + const vlogSelector: vscode.DocumentSelector = {scheme: 'file', language: 'verilog'}; const svlogSelector: vscode.DocumentSelector = {scheme: 'file', language: 'systemverilog'}; const vhdlSelector: vscode.DocumentSelector = {scheme: 'file', language: 'vhdl'}; @@ -96,7 +102,6 @@ function registerLsp(context: vscode.ExtensionContext) { // lsp linter // make first symbols in workspace - lspCore.hdlSymbolStorage.initialise(); lspLinter.vlogLinterManager.initialise(); lspLinter.vhdlLinterManager.initialise(); lspLinter.svlogLinterManager.initialise(); diff --git a/src/function/lsp/core/index.ts b/src/function/lsp/core/index.ts deleted file mode 100644 index d2585e8..0000000 --- a/src/function/lsp/core/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as vscode from 'vscode'; -import { All } from '../../../../resources/hdlParser'; -import { AbsPath } from '../../../global'; -import { hdlPath } from '../../../hdlFs'; -import { isHDLFile, isVerilogFile, isVhdlFile } from '../../../hdlFs/file'; -import { HdlSymbol } from '../../../hdlParser'; - -type ThenableAll = Promise; - -class SymbolStorage { - private symbolMap: Map; - private isHdlFile: (file: AbsPath) => boolean; - constructor(isHdlFile: (file: AbsPath) => boolean) { - this.symbolMap = new Map(); - this.isHdlFile = isHdlFile; - } - - public async getSymbol(path: AbsPath): ThenableAll { - path = hdlPath.toSlash(path); - const allP = this.symbolMap.get(path); - if (allP) { - return await allP; - } - this.updateSymbol(path); - const all = await this.symbolMap.get(path); - return all; - } - - public async updateSymbol(path: AbsPath) { - path = hdlPath.toSlash(path); - const allPromise = HdlSymbol.all(path); - this.symbolMap.set(path, allPromise); - } - - public async deleteSymbol(path: AbsPath) { - path = hdlPath.toSlash(path); - this.symbolMap.delete(path); - } - - public async initialise() { - for (const doc of vscode.workspace.textDocuments) { - // TODO : check support for sv - // TODO : check performance - if (isHDLFile(doc.fileName)) { - await this.updateSymbol(doc.fileName); - } - } - } -} - -const hdlSymbolStorage = new SymbolStorage(isVerilogFile); - -export { - hdlSymbolStorage -}; \ No newline at end of file diff --git a/src/function/lsp/linter/default.ts b/src/function/lsp/linter/default.ts index 9127155..dc85ca3 100644 --- a/src/function/lsp/linter/default.ts +++ b/src/function/lsp/linter/default.ts @@ -1,8 +1,6 @@ import * as vscode from 'vscode'; -import { All } from '../../../../resources/hdlParser'; import { isVerilogFile, isVhdlFile } from '../../../hdlFs/file'; import { Position } from '../../../hdlParser/common'; -import { hdlSymbolStorage } from '../core'; import { BaseLinter } from './base'; import { LspOutput, ReportType } from '../../../global'; @@ -15,13 +13,13 @@ class DefaultVlogLinter implements BaseLinter { async lint(document: vscode.TextDocument): Promise { const filePath = document.fileName; - const vlogAll = await hdlSymbolStorage.getSymbol(filePath); - // console.log('lint all finish'); + // const vlogAll = await hdlSymbolStorage.getSymbol(filePath); + // // console.log('lint all finish'); - if (vlogAll) { - const diagnostics = this.provideDiagnostics(document, vlogAll); - this.diagnostic.set(document.uri, diagnostics); - } + // if (vlogAll) { + // const diagnostics = this.provideDiagnostics(document, vlogAll); + // this.diagnostic.set(document.uri, diagnostics); + // } } private provideDiagnostics(document: vscode.TextDocument, all: All): vscode.Diagnostic[] { @@ -88,13 +86,13 @@ class DefaultVhdlLinter implements BaseLinter { async lint(document: vscode.TextDocument): Promise { const filePath = document.fileName; - const vhdlAll = await hdlSymbolStorage.getSymbol(filePath); - // console.log('lint all finish'); + // const vhdlAll = await hdlSymbolStorage.getSymbol(filePath); + // // console.log('lint all finish'); - if (vhdlAll) { - const diagnostics = this.provideDiagnostics(document, vhdlAll); - this.diagnostic.set(document.uri, diagnostics); - } + // if (vhdlAll) { + // const diagnostics = this.provideDiagnostics(document, vhdlAll); + // this.diagnostic.set(document.uri, diagnostics); + // } } private provideDiagnostics(document: vscode.TextDocument, all: All): vscode.Diagnostic[] { diff --git a/src/global/lsp.ts b/src/global/lsp.ts index bb5ded5..cb00295 100644 --- a/src/global/lsp.ts +++ b/src/global/lsp.ts @@ -1,6 +1,6 @@ import * as vscode from 'vscode'; import { LanguageClient, RequestType, ProtocolConnection } from 'vscode-languageclient/node'; -import { Fast } from '../../resources/hdlParser'; +import { Fast } from '../hdlParser/common'; interface IDigitalIDELspClient { @@ -24,6 +24,7 @@ export const LspClient: IDigitalIDELspClient = { export const CustomRequestType = new RequestType('custom/request'); export const CustomParamRequestType = new RequestType('custom/paramRequest'); export const DoFastRequestType = new RequestType('api/fast'); +export const UpdateFastRequestType = new RequestType('api/update-fast'); export interface ITextDocumentItem { uri: vscode.Uri, diff --git a/src/hdlParser/common.ts b/src/hdlParser/common.ts index 339aef0..16702ad 100644 --- a/src/hdlParser/common.ts +++ b/src/hdlParser/common.ts @@ -2,6 +2,7 @@ import * as vscode from 'vscode'; import { AbsPath, RelPath } from '../global'; +import { HdlLangID } from '../global/enum'; interface Position { // row/line of the cursor, index from 0 @@ -191,6 +192,18 @@ interface CommentResult { length: number } +interface Fast { + content: RawHdlModule[] + languageId: string + macro: Macro +} + +interface All { + content: RawSymbol[] + languageId: HdlLangID + macro: Macro + error: Error[] +} export { Position, @@ -212,5 +225,7 @@ export { HdlDependence, RawSymbol, CommentResult, - makeVscodePosition + makeVscodePosition, + Fast, + All }; \ No newline at end of file diff --git a/src/hdlParser/core.ts b/src/hdlParser/core.ts index cbacfba..cc19733 100644 --- a/src/hdlParser/core.ts +++ b/src/hdlParser/core.ts @@ -8,7 +8,6 @@ import { MainOutput, ReportType } from '../global/outputChannel'; import * as common from './common'; import { hdlFile, hdlPath } from '../hdlFs'; import { HdlSymbol } from './util'; -import { Fast, vhdlFast } from '../../resources/hdlParser'; class HdlParam { private readonly topModules : Set = new Set(); @@ -365,7 +364,7 @@ class HdlParam { } } - public updateFast(path: string, fast: Fast) { + public updateFast(path: string, fast: common.Fast) { const moduleFile = this.getHdlFile(path); if (moduleFile === undefined) { return; diff --git a/src/hdlParser/util.ts b/src/hdlParser/util.ts index c10420f..7b8d76f 100644 --- a/src/hdlParser/util.ts +++ b/src/hdlParser/util.ts @@ -1,10 +1,11 @@ import * as vscode from 'vscode'; -import { Fast, vlogAll, vhdlAll, svAll, All } from '../../resources/hdlParser'; import { hdlFile } from '../hdlFs'; import { HdlLangID } from '../global/enum'; import { AbsPath, LspClient } from '../global'; -import { DoFastRequestType, ITextDocumentItem, CustomParamRequestType } from '../global/lsp'; -import { RawHdlModule } from './common'; +import { DoFastRequestType, ITextDocumentItem, CustomParamRequestType, UpdateFastRequestType } from '../global/lsp'; +import { Fast, RawHdlModule } from './common'; + + async function doFastApi(path: string): Promise { try { @@ -22,20 +23,22 @@ async function doFastApi(path: string): Promise { } } -async function vlogFast(path: string): Promise { - const fast = await doFastApi(path); - return fast; +async function updateFastApi(path: string): Promise { + try { + const client = LspClient.DigitalIDE; + const langID = hdlFile.getLanguageId(path); + if (client) { + const response = await client.sendRequest(UpdateFastRequestType, { path }); + response.languageId = langID; + return response; + } + } catch (error) { + console.error("error happen when run doFastApi, " + error); + console.error("error file path: " + path); + return undefined; + } } -async function svFast(path: string): Promise { - const fast = await doFastApi(path); - return fast; -} - -async function vhdlFast(path: string): Promise { - const fast = await doFastApi(path); - return fast; -} namespace HdlSymbol { /** @@ -46,24 +49,21 @@ namespace HdlSymbol { export function fast(path: AbsPath): Promise { const langID = hdlFile.getLanguageId(path); switch (langID) { - case HdlLangID.Verilog: return vlogFast(path); - case HdlLangID.Vhdl: return vhdlFast(path); - case HdlLangID.SystemVerilog: return svFast(path); + case HdlLangID.Verilog: + case HdlLangID.Vhdl: + case HdlLangID.SystemVerilog: + return doFastApi(path); default: return new Promise(resolve => resolve(undefined)); } } - /** - * @description 0.4.0 后丢弃 - * @param path 文件绝对路径 - * @returns - */ - export function all(path: AbsPath): Promise { + export function updateFast(path: AbsPath): Promise { const langID = hdlFile.getLanguageId(path); switch (langID) { - case HdlLangID.Verilog: return vlogAll(path); - case HdlLangID.Vhdl: return vhdlAll(path); - case HdlLangID.SystemVerilog: return svAll(path); + case HdlLangID.Verilog: + case HdlLangID.Vhdl: + case HdlLangID.SystemVerilog: + return updateFastApi(path); default: return new Promise(resolve => resolve(undefined)); } } diff --git a/src/monitor/event.ts b/src/monitor/event.ts index 85edc0c..cd6ccde 100644 --- a/src/monitor/event.ts +++ b/src/monitor/event.ts @@ -13,7 +13,6 @@ import { prjManage } from '../manager'; import { libManage } from '../manager/lib'; import type { HdlMonitor } from './index'; import { HdlLangID, ToolChainType } from '../global/enum'; -import { hdlSymbolStorage } from '../function/lsp/core'; import { vlogLinterManager, vhdlLinterManager, svlogLinterManager } from '../function/lsp/linter'; enum Event { @@ -71,7 +70,6 @@ class HdlAction extends BaseAction { console.log('HdlAction add', path); path = hdlPath.toSlash(path); - this.updateLinter(path); // check if it has been created @@ -92,7 +90,7 @@ class HdlAction extends BaseAction { // operation to process unlink of hdl files can be deleted in path = hdlPath.toSlash(path); hdlParam.deleteHdlFile(path); - console.log(hdlParam); + refreshArchTree(); const uri = vscode.Uri.file(path); @@ -119,22 +117,14 @@ class HdlAction extends BaseAction { async change(path: string, m: HdlMonitor): Promise { console.log('HdlAction change'); path = hdlPath.toSlash(path); - const langID = hdlFile.getLanguageId(path); - // TODO : check performance - if (langID === HdlLangID.Vhdl) { - await this.updateSymbolStorage(path); - await this.updateHdlParam(path); - } + await this.updateHdlParam(path); await this.updateLinter(path); refreshArchTree(); } - async updateSymbolStorage(path: string) { - hdlSymbolStorage.updateSymbol(path); - } - + // 下一个版本丢弃,完全由后端承担这部分功能 async updateLinter(path: string) { const uri = vscode.Uri.file(path); const document = await vscode.workspace.openTextDocument(uri); @@ -156,7 +146,9 @@ class HdlAction extends BaseAction { return; } - const fast = await HdlSymbol.fast(path); + const fast = await HdlSymbol.updateFast(path); + console.log('get update fast'); + if (!fast) { // vscode.window.showErrorMessage('error happen when parse ' + path + '\nFail to update'); return;