Open GreenYun opened 6 days ago
Could you add your tasks.json file to the ticket?
Could you add your tasks.json file to the ticket?
I do not add any tasks.json to my project or the environment.
Steps to reproduce: Make a new dir, put meson.build
into it, also configure a C project with some random C source codes. At this point, rust-analyzer will not be activated because no Rust project detected. When manually or automatically (re)configure the project by the extension, it calls meson setup
as well as the extension event rust-analyzer: 'onTaskType:cargo'
that activates rust-analyzer.
If you don't have a tasks.json, I don't how this activation event could occur
Here is some log from VS Code after I manually configure my meson project via the extension:
2024-06-26 14:53:34.754 [info] ExtensionService#_doActivateExtension vscode.grunt, startup: false, activationEvent: 'onTaskType:grunt'
2024-06-26 14:53:34.761 [info] ExtensionService#_doActivateExtension vscode.gulp, startup: false, activationEvent: 'onTaskType:gulp'
2024-06-26 14:53:34.765 [info] ExtensionService#_doActivateExtension vscode.jake, startup: false, activationEvent: 'onTaskType:jake'
2024-06-26 14:53:34.768 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onTaskType:typescript'
2024-06-26 14:53:34.823 [info] ExtensionService#_doActivateExtension DavidAnson.vscode-markdownlint, startup: false, activationEvent: 'onTaskType:markdownlint'
2024-06-26 14:53:34.872 [info] ExtensionService#_doActivateExtension rust-lang.rust-analyzer, startup: false, activationEvent: 'onTaskType:cargo'
2024-06-26 14:54:27.869 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2024-06-26 14:54:27.888 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
It seems that the extension tried everything and there was only rust-analyzer that I installed onto my VS Code, which was activated.
This sounds very similar: https://github.com/microsoft/vscode/issues/192043. What are your thoughts?
That makes sense. However, working with CMake plugin on my machine does not have this annoying issue. How strange!
Yeah. Let's keep this open, but I'm pretty sure it isn't a problem with the extension because the only interaction we have with rust-analyzer is setting the path to the rust-projects.json file or whatever it is called.
When I open a C project using meson build system, and this extension activates my rust-analyzer extension by
activationEvent: 'onTaskType:cargo'
, cause rust-analyzer to complain missingcargo.toml
error.