-
Notifications
You must be signed in to change notification settings - Fork 990
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
Conan profile new default --detect does not detect/configure Visual Studio 2022 correctly resulting in failing builds #10185
Comments
Update: Changed the title and description after finding the root cause |
Hi @robindegen This is not a bug, the new As it is necessary to keep improving the I would also like to highlight that for production the profile auto-detection should not be trusted. Using your own profiles (probably managed with |
But if I use it as-is, all the builds fail. Even packages on the conan hub are broken with this change; since it tries to build with mingw if you do that. Shouldn't such a change be at least backwards compatible in a sense that it doesn't just break installations on new systems? I have to manually tweak profiles now to get it to build on all docker images; where before the auto detection worked fine. Even if i don't create any profile and just let it build the first time; the autodetection kicks in and also fails the same way. The reason why is also not very clear; which is likely going to cost a lot of people a lot of time I would expect if this change is indeed the way forward; then conan hub packages still work? That would mean that the cmake generator also has to work; since that is what a lot of those recipes use |
Yes, but there is already a bunch of users moving to the new integrations and trying to use I will discuss with the team, to see if it makes sense to extend the "Visual Studio" default, for 1 or 2 releases more, but please take into account the above comment, that the automatically detected profile is not recommended for production, and the automatic creation of such profile will even be removed in 2.0, so better start planning to manage your own profiles. |
@memsharded I agree with the idea and i understand completely; but then it should be a bit more clear that this is the case for the end-user. Maybe the detect should already state this in a warning. Currently there is no indicidation what-so-ever; and it just seems to randomly break when i update to me as an end-user who is not up to date with all these internals. I didn't even know that 2.0 was in alpha |
We will have a look at next release to see if the legacy integrations can be easily fixed without breaking risks. In any case, for reference for other readers too, changing the default automatically generated profile can be done with |
Thanks, @robindegen for reporting the issue. Indeed, it is a bug. It's already solved here: #10195 (pending of being reviewed/merged) |
Closed by: #10195 to be released soon in Conan 1.43.2 |
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Create the default profile on a system with only Visual Studio 2022 installed:
Content:
I think the problem lies with the detected default profile. It set the compiler to "msvc" instead of "Visual Studio". And the compiler.version is set to 193; instead of "17" which is what I would expect.
If I then build the package with this strange profile; conan will try to build with mingw; which fails on multiple levels. Mingw is not even installed on this sytem. It first complains there is no settings.compiler.cppstd or settings.compiler.runtime set. If I do set this manually; then it will still try to build through mingw:
I think the profile detection is broken with Visual Studio 2022.
If i change the profile manually to this; everything works as expected:
The text was updated successfully, but these errors were encountered: