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

[develop2] Offline behaviour is suboptimal #665

Open
FallenChromium opened this issue Aug 14, 2024 · 2 comments
Open

[develop2] Offline behaviour is suboptimal #665

FallenChromium opened this issue Aug 14, 2024 · 2 comments

Comments

@FallenChromium
Copy link

Hello! I'm currently experimenting with Conan in our open-source project to streamline the cross-compilation process. I've copied conan_provider.cmake from this repo and injected it using TOP_LEVEL_INCLUDES variable inside some of the presets I've defined in "CMakePresets.json" file.

The problem I've encountered is that the configuration step in my IDE is called on a regular basis, and it fails regularly if my connection times out to ConanCenter. This is undesired since "conan install" was already fired up upon first configuration and resolving dependencies from cache should suffice. The error log has a recommendation to use the no-remote flag, but I recognize that it will lead to inconsistencies if I'll add it to conan_provider.

How can we set up a fallback so that the CMake configuration wouldn't fail if all dependencies are present in the cache but Conan can't contact the ConanCenter? I think this is the intended behaviour since pinging ConanCenter on every reconfig (even if the project was already configured with the same preset) sounds like infrastructure expenses to me

@memsharded memsharded self-assigned this Aug 14, 2024
@jcar87
Copy link
Contributor

jcar87 commented Aug 14, 2024

Hi @FallenChromium

You can try passing -DCONAN_INSTALL_ARGS="--no-remote" for subsequent installs - this should stop checking for subsequent calls.

I think it depends on what part of the install process is actually reaching out to the remote - I suspect it is the compatibility extension, which can be tweaked to satisfy your needs as well.

@memsharded memsharded removed their assignment Aug 14, 2024
@FallenChromium
Copy link
Author

To be honest I haven't found a way to set it up so that Conan will use remotes on the first configure call but will not do so on reconfigure, unless conanfile.py has been changed. Maybe you have some ideas on how to implement it? Do you think this should be done by default on conan_provider.cmake?

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

3 participants