Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lgirdwood
Copy link
Member

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.

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
Copy link
Collaborator

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

Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Contributor

@tmleman tmleman left a 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?

@lgirdwood
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants