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

cmake.getLaunchTargetFilename returns nothing (again?) #3957

Closed
emece67 opened this issue Aug 5, 2024 · 11 comments · Fixed by #3965
Closed

cmake.getLaunchTargetFilename returns nothing (again?) #3957

emece67 opened this issue Aug 5, 2024 · 11 comments · Fixed by #3965
Labels
more info needed More info is needed from the community for us to properly triage and investigate.

Comments

@emece67
Copy link

emece67 commented Aug 5, 2024

Brief Issue Summary

Same as #1692 and apparently related to #1412 and #461 , but this time (re-)appeared in version 1.18.43. Up to 1.18.42 it worked OK.

Thanks & regards.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

@gcampbell-msft
Copy link
Collaborator

@emece67 Have you selected your launch target? I notice that when running the "echo" task from here: #1692 (comment) and modifying it to also use ${command:cmake.getLaunchTargetFilename}, it says it can't find any and asks me to pick a launch target. However, once I've selected a launch target in the Project status view:
image

It works as expected:
image

@gcampbell-msft gcampbell-msft added the more info needed More info is needed from the community for us to properly triage and investigate. label Aug 6, 2024
@emece67
Copy link
Author

emece67 commented Aug 6, 2024

Hope this helps:
1 18 42
1 18 43

@gcampbell-msft
Copy link
Collaborator

@emece67 I'm not able to repro this on multiple different large test projects. Also, I've tested the most recent pre-release channel and found that this issue doesn't reproduce. Could you share a repro project?

@emece67
Copy link
Author

emece67 commented Aug 6, 2024

Hi again:

Not in a repo, but I've prepared a minimal example.

Note that I'm working on Windows 11 with MSYS2 using clang. But python, cmake and ninja are not the MSYS2 ones, but "straight" Windows executables. Also, I'm debugging with lldb, so using CodeLLDB.

hello.zip

@Yingzi1234 Yingzi1234 removed the triage label Aug 7, 2024
@gcampbell-msft
Copy link
Collaborator

@Yingzi1234 Could you assist in helping us reproduce this?

@gcampbell-msft
Copy link
Collaborator

@emece67 Are you able to successfully configure?

@emece67
Copy link
Author

emece67 commented Aug 7, 2024

Yes, it both configures and builds.

@gcampbell-msft
Copy link
Collaborator

@emece67 Thanks for posting this issue. I've been able to track this down. There was an issue created here: #3541, that was fixed in this way: #3764.

Could you try to workaround this by using a different build directory? Also, what machine are you working on? My thoughts right now are that the PR that was merged may be a fix for only Linux scenarios.

@emece67
Copy link
Author

emece67 commented Aug 8, 2024

I think you're right. Changing paths from ${sourceDir}/~build/${presetName} to ${sourceDir}/.build/${presetName} or ${sourceDir}/build/${presetName}fixed it.

I'm working in Windows 11, where paths such as ${sourceDir}/~build/${presetName} are perfectly valid (in my systems, paths starting with ~ are not synced, thus my insistance on using ~).

@gcampbell-msft
Copy link
Collaborator

@emece67 I would agree, I think we'll insert a quick fix where we only do that adjustment in linux and/or mac. Thanks for the issue

@v-frankwang
Copy link
Collaborator

We verified the issue on CMake tools: v1.19.45 and it has been fixed.

ENV:
CMake Tools:v1.19.45
vscode: 1.92.2

Actual result:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed More info is needed from the community for us to properly triage and investigate.
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

4 participants