You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or put it with other words, can a conan recipe define requirements something like ``requires="git://github.com/someuser/somerepo.git#sometag"``?
23
+
24
+
No, it is not possible. There are several technical reasons for this, mainly around the dependency resolution algorithm, but also about performance:
25
+
26
+
- Conan manages dependency versions conflicts. These can be efficiently handled from the abstract reference quickly, while a git repo reference would require cloning contents even before deciding.
27
+
- The version overriding mechanism from downstream consumers to resolve conflicts cannot be implemented either with git repos, as both the name and the version of the package is not defined.
28
+
- Conan support version-ranges, like depending on ``boost/[>1.60 <1.70]``. This is basically impossible to implement in git repos.
29
+
- Conan has an “update” concept, that allows to query servers for latest modifications, latest versions, or even latest revisions, which would not work at all with git repos either.
30
+
- Binary management is one of the biggest advantages of Conan. Obviously, it is not possible to manage binaries for this case either.
31
+
32
+
In summary, whatever could be done would be an extremely limited solution, very likely inefficient and much slower, with a lot of corner cases and rough edges around those said limitations. It would require a big development effort, and the compounded complexity it would induce in the codebase is a liability that will slow down future development, maintenance and support efforts.
33
+
34
+
Besides the impossibility on the technical side, there are also other reasons like well known best practices around package management and modern devops in other languages that show evidence that even if this approach looks like convenient, it should be discouraged in practice:
35
+
36
+
- Packages should be fully relocatable to a different location. Users should be able to retrieve their dependencies and upload a copy to their own private server, and fully disconnect from the external world. This is critical for robust and secure production environments, and avoid problems that other ecosystems like NPM have had in the past. As a consequence, all recipes dependencies should not be coupled to any location, and be abstract as conan "requires" are.
37
+
- Other languages, like Java (which would be the closest one regarding enterprise-ness), never provided this feature. Languages like golang, that based its dependency management on this feature, has also evolved away from it and towards abstract "module" concepts that can be hosted in different servers
38
+
39
+
So there are no plans to support this approach, and the client-server architecture will continue to be the proposed solution. There are several alternatives for the servers from different vendors, for public open source packages `ConanCenter <https://conan.io/center>`_ is the recommended one, and for private packages, the free `ArtifactoryCE <https://conan.io/downloads>`_ is a simple and powerful solution.
40
+
41
+
18
42
How to obtain the dependents of a given package?
19
43
------------------------------------------------
20
44
@@ -90,9 +114,9 @@ In the case of the ``<channel>`` term, normally OSS package creators use ``testi
90
114
only in few configurations) and ``stable`` when the recipe is ready enough to be used (e.g. it is built and tested in a wide range of
91
115
configurations).
92
116
93
-
From the perspective of a library developer, channels could be used to create different scopes of your library. For example, use ``rc``
94
-
channel for release candidates, maybe ``experimental`` for those kind of features, or even ``qa``/``testing`` before the library is checked
95
-
by QA department or testers.
117
+
It is strongly recommended that packages are considered immutable. Once a package has been created with a user/channel, it shouldn't be
118
+
changed. Instead, a new package with a new user/channel should be created.
119
+
96
120
97
121
What does "outdated from recipe" mean exactly?
98
122
----------------------------------------------
@@ -118,6 +142,9 @@ recipe. That means: if the recipe has completely removed an option (it could be
118
142
that were generated previously with that option, those packages will be impossible to install as their package ID are calculated from the
119
143
recipe file (and that option does not exist anymore).
120
144
145
+
When using "revisions" (it is opt-in in Conan 1.X, but it will be always enabled in Conan 2.0), this should never happen, as doing any change
146
+
to a recipe or source should create a new revision that will contain its own binaries.
0 commit comments