xmake-io / xmake-vscode

🍩 A XMake integration in Visual Studio Code
https://xmake.io
Apache License 2.0
228 stars 55 forks source link

Clear diagnosis before updates #181

Closed LelouchHe closed 1 year ago

LelouchHe commented 1 year ago

Since for now xmake check is running at root and it generates warnings/errors for all included xmake.lua, it is better clear diagnosis every time before it's updated

and onDidDelete event is no longer needed

LelouchHe commented 1 year ago

另..xmake.lua 是必须连接起来的么?

如果我有若干独立的 xmake.lua,和根目录 xmake.lua 没有任何联系,那么现在的 xmake check 是没有办法检查出错误的.

之前由于使用 -F 参数,是针对每个 xmake.lua 来进行的

waruqi commented 1 year ago

这个 patch 测了下,尽管错误增删会及时更新,但是如果 root 和 src 子目录 xmake.lua 同时存在错误,只能显示一个。。显示不全

waruqi commented 1 year ago

另..xmake.lua 是必须连接起来的么?

如果我有若干独立的 xmake.lua,和根目录 xmake.lua 没有任何联系,那么现在的 xmake check 是没有办法检查出错误的.

之前由于使用 -F 参数,是针对每个 xmake.lua 来进行的

xmake check 原本就是检测整个工程的,如果没 includes 的,就不算当前工程的配置,没必要处理。。

加了 -F ,会导致子目录 xmake.lua 强制作为工程根目录。。上层root 的 xmake.lua 会被完全忽略,导致子 xmake.lua 引用了 root/xmake.lua 的一些配置访问不到,导致更多的错误

LelouchHe commented 1 year ago

这个 patch 测了下,尽管错误增删会及时更新,但是如果 root 和 src 子目录 xmake.lua 同时存在错误,只能显示一个。。显示不全

我这里貌似是没有这个问题的. image

我的猜测是: 因为某些错误,不是从 xmake check 来的,所以没法检测出来. 比如 includes 的错误,或语法错误. 有的时候, check 的警告/错误就没有了..如下:

image

你能展示下你的 error 是什么么?

waruqi commented 1 year ago

哦哦,我知道原因了 跟 插件没关系。。是 xmake check 的问题

root xmake.lua 有语法错误,提前报错 停止继续加载了。。那这问题不大。。