优化 fast 更新算法

This commit is contained in:
锦恢 2024-12-11 15:41:04 +08:00
parent 9b77a614d5
commit 0dd947addd

View File

@ -2,12 +2,13 @@ import * as chokidar from 'chokidar';
import * as vscode from 'vscode';
import { refreshArchTree } from '../function/treeView';
import { AbsPath, MainOutput, opeParam, ReportType } from '../global';
import { AbsPath, LspClient, MainOutput, opeParam, ReportType } from '../global';
import { hdlFile, hdlPath } from '../hdlFs';
import { hdlParam, HdlSymbol } from '../hdlParser';
import type { HdlMonitor } from './index';
import { BaseAction, Event } from './event';
import { hdlIgnore } from '../manager/ignore';
import { DoFastToolChainType, SyncFastRequestType } from '../global/lsp';
export class HdlAction extends BaseAction {
selectFSWatcher(m: HdlMonitor): chokidar.FSWatcher | undefined {
@ -99,8 +100,10 @@ export class HdlAction extends BaseAction {
return;
}
const fileType = 'common';
const toolChain = opeParam.prjInfo.toolChain as DoFastToolChainType;
// 更新 hdl 文件
const fast = await HdlSymbol.fast(path, 'common');
const fast = await LspClient.DigitalIDE?.sendRequest(SyncFastRequestType, { path, fileType, toolChain })
if (fast) {
hdlParam.updateFast(path, fast);
}