question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] How come conan create lock requires access to remotes?

See original GitHub issue

I am trying to execute the command conan lock create conanfile.py -pr=<profile> --base --lockfile-out=<lockfile path> while my wifi is off, and I get a message saying Unable to connect to .... saying that my remotes aren’t reachable. Please note that I am not using the --update flag.

How come this command needs to be able to access remotes? Assuming all recipes referenced in my conanfile.py are in my cache, I would not need to download any recipes. What is this request to the remotes for?

This is on macOS, and my conan version is 1.40.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tolstikhcommented, Oct 20, 2021

Thanks @memsharded for answering my questions, its much appreciated. I have a clearer picture of the situation.

0reactions
memshardedcommented, Oct 19, 2021

I can confirm that --build allows me to lock when disconnected from the internet. Are there any other consequences to setting that flag? If not, perhaps that should be set. To me it seems that the availability of a binary package is incidental to locking, given that you can determine the needed package ID without actually building anything.

Not always. There are some corner cases, like when using the package_revision_mode that without building the upstream packages won’t be able to compute the downstream package_id. We would also like to get rid of this case, maybe in 2.0, we will see…

One consequence of using --build is that the package_revisions will not be locked. That is not a problem if not relying on using different package_revisions, which is not recommended and should only happen in uncontrolled (a bit pathological) environments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[bug] Conan remove --locks doesn't work · Issue #7300 - GitHub
I discovered that if a process locks a file or a directory belonging to the package, Conan will not check that deleting failed,...
Read more >
Conan Documentation
Conan Documentation, Release 1.56.0. • Looks for the package recipe in the defined remotes. Conan comes with conancenter remote as the default,.
Read more >
conan lock — conan 1.44.1 documentation
Generates and manipulates lock files. positional arguments: {update,build-order,clean-modified,install,create,bundle} sub-command help update Complete ...
Read more >
Introduction — conan 1.53.0 documentation
A package in a lockfile is fully locked if it contains a prev (package revision) field defined. Fully locked packages cannot be built...
Read more >
conan user — conan 1.44.1 documentation
The password is not stored in the client computer at any moment. Conan uses JWT, so it gets a token (expirable by the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found