-
Notifications
You must be signed in to change notification settings - Fork 349
scripts: vscode: add support for building SOF from vscode tasks #9879
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
Conversation
scripts/vscode-task.sh
Outdated
| # 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.
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.
Updated to check for environment variable then default to "getting started" directories if not found.
scripts/vscode-task.sh
Outdated
| # 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.
tmleman
left a comment
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. |
1931701 to
59109e6
Compare
|
Changes for V2:
|
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 <liam.r.girdwood@intel.com>
59109e6 to
c5fce6e
Compare
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.
Seeems like quite harmless script and if it helps building sof in vscode, then that should be good enough reason to get this merged. Then again I for one have so far installed all required python stuff in my ~/.local . So is it a correct assumption that a virtual environment is always needed?
Yes - always needed for west and Zephyr tooling. |
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.