-
Notifications
You must be signed in to change notification settings - Fork 449
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
Error when ninja is not in PATH (but ninja can be executed by cmake) #4042
Comments
@emmenlau What does this result in? Is it blocking the use of your scenario? What do you have set for |
@emmenlau Additionally, what version does this start to happen on ? To investigate, we'd need the version that this started happening on, and then some way to reproduce this, whether it's an example project or detailed repro steps. |
@JVApen @emmenlau If you could provide some more information about this issue, that would be great. For example, repro steps to reproduce this, or a small exacmple of a script you're using. Looking at the code, nothing between version 1.18.44 and 1.19.50 was changed when checking the cmake.exe, so I wouldn't expect that it's causing an issue. Therefore, more investigation may be needed and any repro steps can help with that. Thanks! Copied from #4037 |
@emmenlau Could you follow the steps below step-by-step to check if your settings are working? If the problem is still reproduced can you provide us with the exact steps and documentation of the reproduction, it would be very beneficial to our investigation. Thank you!
If these commands do not return a path, the tools may not be installed, or their paths may not have been properly added to the environment variables.PATH
|
Dear @Yingzi1234 , However, some of the things you are asking is already known. Sadly, I do not have
Therefore my answers are:
I know that
I know that
The wrapper script works and builds successfully. We use it hundreds of times a day, since many months, on many different platforms and machines.
The build works via the wrapper script, including the
We do indeed work with VSCode. But we can not set the path to ninja in a hard-coded way. We put ninja on the |
A simple reproducer is something like this:
|
@emmenlau When trying to reproduce with these steps: #4042 (comment), I notice that the "Bad CMake executable" popup appears in 1.18.44 as well. Do you also see this? |
@emmenlau I've tracked the issue down. This didn't come from a CMake Tools update, but rather a VS Code update. In July, VS Code updated to 1.92 which now uses Node 20. This contains a breaking change for Could you please test the vsix (after modifying the file extension from .zip to .vsix) from here? |
I'll test it later today, thanks a lot for the great investigation!!! |
With #4037 out of the way, this small issue remains: I'm still getting the error (or warning):
Aside from that, the build works fine, and I do not know if this error/warning has a high significance? It would be nice if you could check that there is no underlying problem when Or does cmake-tools need to know about |
@emmenlau That issue is coming from the fact that it's trying to detect a preferred generator, possibly with default preferredgenerators, if you haven't set this setting and you're not using the unspecified kit. Then, it shows this if it can't find it. However, this can be worked around by setting the |
That sounds like a very suitable workaround! However I fail to get this to work. I'm setting
in my VSCode user settings, but after closing and re-opening VSCode, the error message persists :-( |
@emmenlau Ah, I hadn't created the vsix on the most recent code, please re-download the vsix from the PR and try again. THanks! |
All issues fixed!!! Great work!!! Should we close the issues, or do you want to wait for the release of the PR? |
Brief Issue Summary
We have a slightly special setup, where we wrap
cmake
in a wrapper script (viacmake.cmakePath
). The wrapper script helps us to isolate certain parts of the build system that should be configured in a specific way. All that is working well, however in recent versions of this extension, we started to get errors of the form:Indeed we do not have
ninja
in the path. When our wrapper script is called with arguments for the build, it will put ninja on the path, so it can be found. But on a plain shell,ninja
is not available.Is that something that can be considered, or worked around?
CMake Tools Diagnostics
Debug Log
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: