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

Variant expansion initially empty when referenced from settings.json #955

Closed
allsey87 opened this issue Dec 4, 2019 · 4 comments
Closed
Labels
bug a bug in the product Feature: configure Feature: variants stale-old to use with the close-old-issues bot
Milestone

Comments

@allsey87
Copy link

allsey87 commented Dec 4, 2019

Brief Issue Summary

Using variants in settings.json such as:

"cmake.buildDirectory": "${workspaceFolder}/build-${variant:buildFor}-${variant:buildType}",

results in an empty directory called build-- being created when I select a variant from the GUI. Once this process is complete, I get the proper directory being created and used for the build, but this empty, incorrectly named build directory is left behind.

Expected:

No directory build-- should be created. I guess this could be solved by parsing and loading cmake-variants.json before processing settings.json.

Platform and Versions

  • Operating System: Arch Linux
  • CMake Version: 3.15.5
  • VSCode Version: Code - OSS 1.40.1
  • CMake Tools Extension Version: 1.2.3
  • Compiler/Toolchain: GCC 9.2
@Zingam
Copy link
Contributor

Zingam commented Dec 5, 2019

Maybe these are related: #632 #334 #564 #869

@bobbrow bobbrow added this to the On Deck milestone Jan 10, 2020
@SafwenBenJha
Copy link

I would like to mention that also variant expansion does not work in tasks.json

{   "version": "2.0.0",
    "tasks": [
        {
            "label": "echo test",
            "type": "shell",
            "command": "echo ${variant: myvariantname}",
            "problemMatcher": []
        }
    ]
}

This will always output an empty string instead of the actual value.
Is there a workaround?

@github-actions
Copy link

This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.

@github-actions github-actions bot added the stale-old to use with the close-old-issues bot label Oct 19, 2023
Copy link

This issue is now closed due to there being no activity on it for the past 14 days since being marked as 'stale-old'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product Feature: configure Feature: variants stale-old to use with the close-old-issues bot
Projects
None yet
Development

No branches or pull requests

4 participants