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

Build directory not determined correctly #3594

Closed
KUGA2 opened this issue Feb 15, 2024 · 5 comments · Fixed by #3595 or #3604
Closed

Build directory not determined correctly #3594

KUGA2 opened this issue Feb 15, 2024 · 5 comments · Fixed by #3595 or #3604
Assignees
Labels
bug a bug in the product fixed (release pending) fixed in pre-release and is pending official release regression used to work and no longer does. Regressions are typically high priority
Milestone

Comments

@KUGA2
Copy link

KUGA2 commented Feb 15, 2024

Brief Issue Summary

Since today's update (v1.16.32 -> v1.17.15) the build dir is not determined correctly anymore.
The error is reproducible and is avoided by changing the version back to the old one.

It is clearly visible in the log:

[proc] Executing command: /usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Debug  -S/workspaces/prj -B/workspaces/prj/Build/x86_64-linux-user-gcc-Release-Ninja -G Ninja

Debug != Release

cmake -preset xxx -N shows the correct path.

Problem is probably releated to our preset, it is awfully complicated... I cannot share it completely, so I will give you a reduced version . If needed I will provide a standalone example.

(configuration presets)

        {
            "name": "base",
            "hidden": true,
            "displayName": "Base Config",
            "description": "Everything else should inherit from here.",
            "generator": "Ninja",
            "binaryDir": "$env{BINARY_DIR}",
            "environment": {
                "BINARY_DIR": "${sourceDir}/Build/$env{TOOLCHAIN}-$env{BUILD_TYPE}-${generator}",
                "BUILD_TYPE": "Release"
            },
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "$env{BUILD_TYPE}"
            }
        },
        {
            "name": "switch-debug",
            "hidden": true,
            "description": "Settings for a debug build",
            "environment": {
                "BUILD_TYPE": "Debug"
            },
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug"
            }
        },
        {
            "name": "x86_64-linux-user-gcc-Release",
            "description": "Release build for linux in prj/devenv container.",
            "inherits": "base"
        },
        {
            "name": "x86_64-linux-user-gcc-Debug",
            "description": "Debug build for linux in prj/devenv container.",
            "inherits": [
                "switch-debug",
                "x86_64-linux-user-gcc-Release"
            ]
        },

(I can not attach any further log right now. It might share to much private information. If you request the standalone example, then I can do this)

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

@gcampbell-msft
Copy link
Collaborator

@KUGA2 Thank you for letting us know! We've gotten one other regression bug that has already been fixed, so we'll take a look and plan to get a fix out for this and hopefully release early next week with the other fix.

I have been able to reproduce the bug, and I think I have narrowed it down to a change made in this PR: #3488. I will investigate finding a fix while still keeping the integrity of the fix for the bug that was fixed with that PR.

@gcampbell-msft gcampbell-msft added bug a bug in the product regression used to work and no longer does. Regressions are typically high priority and removed triage labels Feb 15, 2024
@gcampbell-msft gcampbell-msft added this to the 1.17 milestone Feb 15, 2024
@gcampbell-msft gcampbell-msft self-assigned this Feb 15, 2024
@gcampbell-msft
Copy link
Collaborator

@KUGA2 I have opened a PR for this here: #3595. I have tested and confirmed that this fix resolves this bug! Assuming that the PR merges today, it should be released in the pre-release channel tomorrow.

Thanks!

@gcampbell-msft gcampbell-msft added the fixed (release pending) fixed in pre-release and is pending official release label Feb 15, 2024
@KUGA2
Copy link
Author

KUGA2 commented Feb 21, 2024

I can confirm that this is fixed in v1.17.16

@gcampbell-msft
Copy link
Collaborator

gcampbell-msft commented Feb 21, 2024

@KUGA2 The fix I merged seems to have regressed other inheriting for things like cacheVariables.

Could you all download this file:
cmake-tools.zip
, change the extension to a .vsix. and install it manually in VS Code and confirm that it still fixes your issue? I locally tested and I believe it still fixes your issue, but please confirm.

@KUGA2
Copy link
Author

KUGA2 commented Feb 22, 2024

Yes, i can confirm this works.
btw: We also had a similar error like #3603. I can confirm this is also fixed with this private build.

PS: please change the version of your local build to something reasonable. like 9.9.9 or 0.0.0. It is 1.13 which is quite confusing.

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 fixed (release pending) fixed in pre-release and is pending official release regression used to work and no longer does. Regressions are typically high priority
Projects
Status: Completed
2 participants