-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts: vscode: add support for building SOF from vscode tasks #9879
base: main
Are you sure you want to change the base?
Conversation
vscode tasks can execute multiple commands easily so wrap the necessary commands to use the SOF convenience script with a small script that enables the python virtual environment. Signed-off-by: Liam Girdwood <[email protected]>
# Current vscode tasks have difficulty executing multiple commands. | ||
|
||
# setup environment | ||
source ~/zephyrproject/.venv/bin/activate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as for #9878 - too many hard-coded assumptions. Let's not do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about make this conditional, if test -e ~/zephyrproject/.venv/bin/activate handling the default config?
I don't really mind for vscode-task.sh -- this can make the default scase easier and non-default setups can use a symlink or something like that.
# Current vscode tasks have difficulty executing multiple commands. | ||
|
||
# setup environment | ||
source ~/zephyrproject/.venv/bin/activate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about make this conditional, if test -e ~/zephyrproject/.venv/bin/activate handling the default config?
I don't really mind for vscode-task.sh -- this can make the default scase easier and non-default setups can use a symlink or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have nothing against adding this script, but it seems to me its usefulness may be negligible. After all, every development environment can be different. I have two such scripts that I call from vscode as a task, one written in bash and the other in PowerShell.
Will this be an example for others?
This script allows vscode to parse the build output and ctrl-click on the warnings/errors so it is quite useful. Fwiw, if your scripts are generic then I would recommend upstreaming too. Fwiw, vscode has all the tooling for all languages/tools we use in SOF today and is cross platform (it can be our IADK UI), I think its great for increasing everyone's velocity. Its not mandatory, but if developers do use it we should make it as smooth as possible. |
vscode tasks can execute multiple commands easily so wrap the necessary commands to use the SOF convenience script with a small script that enables the python virtual environment.