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

[Feature] Can you please add a button to force Conan to rebuild all dependencies? #236

Open
Jeanmilost opened this issue Jun 14, 2024 · 3 comments

Comments

@Jeanmilost
Copy link

I'm using the Conan Package Manager in my Visual Studio 2022.

It would be very useful if a button (or a menu item in the context menu when right-clicking the project) would allow to clear the build of the current dependencies, in order to be able to rebuild them completely.

AFAIK this is only (partially) possible by changing something in project configuration, e.g. removing and adding back the dependencies.

Would it be possible to add a such functionality? Or if it already exists, can you please explain me how to achieve that?

@memsharded
Copy link
Member

Hi @Jeanmilost

What would be the use case? Why would you like to re-build all dependencies from source, if they are already built? The revisions and package_id mechanism mostly guarantees that this shouldn't be necessary.

@Jeanmilost
Copy link
Author

Jeanmilost commented Jun 14, 2024

Hello @memsharded

What would be the use case? Why would you like to re-build all dependencies from source, if they are already built? The revisions and package_id mechanism mostly guarantees that this shouldn't be necessary.

For example when I need to modify the content of the config files generated by Conan in the .conan folder (they are named Debug_Win32/x64 and Release_Win32/x64). In my case I had to add an [options] section, or change the value of compiler.runtime from dynamic to static manually to workaround a bug.

However I noticed that the dependencies were not rebuilt in this case, and I had to find a workaround to force them to rebuild. The only way I found was to remove and restore all my libraries from the Conan Package Manager.

Or perhaps I miss something and there is already an existing manner to achieve that?

@memsharded
Copy link
Member

For example when I need to modify the content of the config files generated by Conan in the .conan folder (they are named Debug_Win32/x64 and Release_Win32/x64). In my case I had to add an [options] section, or change the value of compiler.runtime from dynamic to static manually to workaround a bug.

Dependencies doesn't need to be rebuilt when different variants of the dependencies are requested. Every different variant of the dependencies has its own unique package_id. If the package_id exists that matches your configuration, you can use it, if not it will be either downloaded from the server if it exists, or if not, the default --build=missing argument in the plugin will manage to build it from source. But force-rebuilding everything from source is unnecessary, Conan already manage that automatically and efficiently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants