disroop / vs-code-conan

Conan integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=disroop.conan
MIT License
18 stars 10 forks source link

Proposed feature: make profile:build and profile:host optional #184

Closed zlacelle closed 1 year ago

zlacelle commented 1 year ago

I've never written typescript before so this could use a check. But: I've tried to make it so that the profileCommand only adds build or host profile if the argument is defined. This is so that you can use the cmake generator for Conan in Conan 1.x (if you specify both, that particular generator breaks).

Closes #183

mymichu commented 1 year ago

Thank you for your contribution. Could you specify which Conan version you are using? With Conan 1.47 and upwards in combination with the cmake generator, we haven't discovered any issues. I know that "profile:host" and "profile:build" is a new feature, but before I think it was only profile, for example "profile = default". Could you provide any example so we can investigate?

stefansli commented 1 year ago

Please guard this behavior behind a new flag since the current behavior is a sensible default. When using the modern generators, setting both build and host profile is required and defining the profile keyword as an alias for both is handy and improves readability.

But I can also see the argument that the current implementation is confusing because it doesn't mirror conans behavior.

Looking at the feature the single --profile Argument will vanish, so I think it's important to have an easy migration path for existing users.