yoctoproject / vscode-bitbake

Bitbake language support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake
Other
45 stars 10 forks source link

Embedded languages diagnostics generate problems for background virtual files #169

Closed Thuna7 closed 8 months ago

Thuna7 commented 8 months ago

Despite configuring the Yocto BitBake extension, I'm encountering compatibility issues when used alongside the ShellCheck extension in VSCode. Specifically, I receive errors from the following file only when the Yocto BitBake extension is enabled:

~/.vscode-server/data/User/workspaceStorage/073f7e157f535776aa165b2f075bf852/yocto-project.yocto-bitbake/embedded-documents/c42156fb-8176-41de-9edb-4263f51e74fe.py

In an attempt to resolve this, I excluded the .vscode-server directory in my settings.json file using the following configuration:

"shellcheck.ignorePatterns": { "**/.vscode-server/**": true }

However, the problem persists with the file. Any suggestions on how to address this?

deribaucourt commented 8 months ago

Unfortunately this is a limitation of the virtual files API we use to get the bash/python diagnostics into bitbake files. We create these .py/.sh files in the workspaceStorage and let the external extensions like shellcheck analyze them in the background. This is detailed in our Troubleshooting guide.

So there's no fix for this untill VSCode makes some progress on this topic (which has been years). The only thing I could propose is to add a setting to disable our support for bash/python regions of bitbake files altogether, but you'll also lose access to other features of these regions like hover, definitions, even evolved highlighting if I'm not mistaken?

@idillon-sfl is the architect of that part.

idillon-sfl commented 8 months ago

If you mean errors and warnings in the "PROBLEMS" tab, then it is normal and expected, unfortunately. Screenshot from 2024-03-11 11-18-28

If you mean anything else, then it is a problem we are still not aware of. In that case, please provide us with more information, such as the error message or a screenshot. Thank you

Thuna7 commented 8 months ago

If you mean errors and warnings in the "PROBLEMS" tab, then it is normal and expected, unfortunately.

That's exactly the issue I meant. Thank you for your support; I'll close the issue.