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

Fix 'pickString' evaluation #12100

Merged

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Jan 23, 2023

Fixes the 'pickString' evaluation in tasks and launch configurations.

Fixes #11585

Contributed on behalf of STMicroelectronics

What it does

Similar to 'promptString', 'pickString' can be used to replace variables in task and launch configurations. However 'pickString' values were not correctly handled which prevented them from being evaluated. This is now fixed.

How to test

Run the task from the following task.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo select foo or bar",
            "type": "shell",
            "command": "echo ${input:select-foo-or-bar}",
            "problemMatcher": []
        }
    ],
    "inputs": [
        {
            "id": "select-foo-or-bar",
            "type": "pickString",
            "description": "Select foo or bar",
            "default": "foo",
            "options": [
                "foo",
                "bar"
            ],
        }
    ]
}

Review checklist

Reminder for reviewers

Similar to 'promptString', 'pickString' can be used to replace variables in task and
launch configurations. However 'pickString' values were not correctly handled which
prevented them from being evaluated. This is now fixed.

Fixes eclipse-theia#11585

Contributed on behalf of STMicroelectronics
@vince-fugnitto vince-fugnitto added tasks issues related to the task system vscode issues related to VSCode compatibility labels Jan 23, 2023
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
I confirmed that the pickString is properly evaluated with the example task configuration.

@JonasHelming JonasHelming merged commit f925bdb into eclipse-theia:master Jan 24, 2023
@paul-marechal paul-marechal added this to the 1.34.0 milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks issues related to the task system vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tasks: inputs variable of type pickString not evaluated
4 participants