Comments (4)
Thanks for the feedback. I am re-opening and moving to the docs repo, this would still be nice to document better.
from docs.
Finally (unrelated to this) what is the best way of programatically applying a
core.*
config value?
Just to clarify this a bit: we'd like to apply different core.*
configurations on different machines. In this case, to enable the download cache for CI machines but not on developer machines.
from docs.
You are right, there is some documentation pending for this feature.
My understanding is that it can be used on a CI node to prevent the need to repeatedly download dependencies from a Conan remote every time a job is run. Is it suitable for this use case?
Yes, this is the use case, trade local storage for network transfer. In practice for fast networks it is not a huge saving, because artifacts are kept as-is, so it is still necessary to unzip them, and that is the most expensive operation. But it will certainly save bandwidth in any case
More specifically, are there concurrency guarantees? For example, is safe to use even if multiple executors are running simultaneously on the same machine?
Yes, the download cache is designed to be concurrent, at the machine level (lock-synchronization use file system locks, which is an OS-level mechanism), so it might not work for network or shared drives across different machines, specially different OSs, but it should be able to use it from multiple concurrent Conan caches in the same machine.
Finally (unrelated to this) what is the best way of programatically applying a core.* config value? Conan v1 had conan config set. It looks like core config can't be overridden with profiles or commandline parameters. Does this mean the only way is something like echo "core.foo=bar" >> .conan2/global.conf, or is there a better way?
There are no global.conf
edition commands in 2.0, because the file is a jinja template and it is not possible to round-trip it.
But it should be doable to add some conditional on jinja to enable the conf only for specific machines, based for example in some environment variable. You can always have another different global.conf
and conan config install
that file only from CI. Note the conan config install
can be used for multiple origins, to install individual folders, etc.
from docs.
Many thanks @memsharded for your quick reply, exactly what I was hoping to hear! Much appreciated.
I'd considered the extra conan config install, though then we'd have multiple global.conf
files that need keeping in sync. The templating option sounds promising though, thanks for the tip.
from docs.
Related Issues (20)
- How do we check the build OS in a recipe with Conan v2? HOT 2
- Improve docs around `upload_policy=skip` behaviour
- AuthenticationException: error HOT 10
- How to use conan with CMake to generate multi-config Visual Studio Solution Files? HOT 2
- Add a search functionality to the docs which delivers useful results. HOT 4
- Doxygen support HOT 5
- [question] Are there any examples of custom/user defined templates? HOT 2
- conan export-pkg document is very difficult to read due to formatting HOT 3
- [question] How do I configure a conan package to use MY relocatable cmake package files? HOT 7
- Missing migration docs for "How to check the version of the Conan client inside a conanfile" HOT 2
- [bug] Packages using version numbers containing uppercase characters can't be published HOT 2
- undefined reference to `dladdr@GLIBC_2.34' HOT 1
- Tutorial/Consuming packages/Build a simple CMake project using Conan wrong command for windows
- Clarifications for build-requires graph cost & more
- [bug] conan remote command fails if remotes.json doen't exist HOT 7
- [question] Components hide global definitions in layout method HOT 3
- building fmt/10.1.0 on windows failed about unicode HOT 2
- building openexr/3.2.1 on the windows, failed with a cmake error. HOT 2
- [question] How to exclude tool_requires from graph info output HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.