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

Implement conf that avoids binary skipping in the graph #14466

Merged
merged 8 commits into from
Aug 23, 2023
Merged
3 changes: 2 additions & 1 deletion conans/client/graph/graph_binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ def evaluate_graph(self, deps_graph, build_mode, lockfile, remotes, update, buil
continue
self._evaluate_node(node, build_mode)

self._skip_binaries(deps_graph)
if self._cache.new_config.get("core.graph:skip_binaries", check_type=bool, default=True):
self._skip_binaries(deps_graph)

@staticmethod
def _skip_binaries(graph):
Expand Down
2 changes: 2 additions & 0 deletions conans/model/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"core.download:retry_wait": "Seconds to wait between download attempts from Conan server",
"core.download:download_cache": "Define path to a file download cache",
"core.cache:storage_path": "Absolute path where the packages and database are stored",
# TODO. Find better name
"core.graph:skip_binaries": "Lorem Ipsum",
# Sources backup
"core.sources:download_cache": "Folder to store the sources backup",
"core.sources:download_urls": "List of URLs to download backup sources from",
Expand Down
8 changes: 8 additions & 0 deletions conans/test/integration/graph/test_skip_binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ def test_private_skip():
client.run("create . --name=app --version=1.0 -v")
client.assert_listed_binary({"dep/1.0": (NO_SETTINGS_PACKAGE_ID, "Skip")})

# Ensure the skip_binaries conf is able to avoid skips
client.save_home({"global.conf": "core.graph:skip_binaries=False"})
client.save({"conanfile.py": GenConanfile()})
client.run("create . --name=dep --version=1.0")
client.save({"conanfile.py": GenConanfile().with_requires("pkg/1.0")})
client.run("create . --name=app --version=1.0 -v")
client.assert_listed_binary({"dep/1.0": (NO_SETTINGS_PACKAGE_ID, "Cache")})


def test_private_no_skip():
# app -> pkg -(private)-> dep
Expand Down