-
Notifications
You must be signed in to change notification settings - Fork 989
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* allow adding deps in lockfiles * working in augment * working * first version passing tests * fix tests and build_info * separate build-requires, sorted nodes, better status * fix broken tests * test checking older versions of lockfiles * update docstring * merged develop * dynamic lockfiles * dynamic test * working with remove_orphans, but complicated for build_requires * removed remove_orphans logic * test passing * [refact] Run 'conanfile::build()' only once in the sources (#6602) * run build and related hooks in one single point * duplicate arg * prefer calling * need to change the tests, message changes * rename to 'run_build_method' * build_folder is already assigned to the conanfile * removing dead file (#6615) * fix issue parsing system_libs field (#6616) * Set environment variables in conaninfo.txt when using export-pkg (#6607) * set conaninfo environment variables * add test * fix indentation * refactor and filter deps * fix variable name * fix format * capture the expected exception (#6622) * new test * opt-in relax_lockfile Co-authored-by: Javier G. Sogo <[email protected]> Co-authored-by: Carlos Zoido <[email protected]>
- Loading branch information
1 parent
fe99ec8
commit e29a29b
Showing
8 changed files
with
184 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import json | ||
import unittest | ||
|
||
from conans.test.utils.tools import TestClient, GenConanfile | ||
|
||
|
||
class GraphLockDynamicTest(unittest.TestCase): | ||
|
||
def remove_dep_test(self): | ||
# Removing a dependency do not modify the graph of the lockfile | ||
client = TestClient() | ||
client.save({"conanfile.py": GenConanfile()}) | ||
client.run("create . LibA/0.1@") | ||
client.run("create . LibB/0.1@") | ||
client.save({"conanfile.py": GenConanfile().with_require_plain("LibA/0.1") | ||
.with_require_plain("LibB/0.1")}) | ||
client.run("create . LibC/0.1@") | ||
client.save({"conanfile.py": GenConanfile().with_require_plain("LibC/0.1")}) | ||
client.run("graph lock .") | ||
lock1 = json.loads(client.load("conan.lock"))["graph_lock"]["nodes"] | ||
self.assertEqual(4, len(lock1)) | ||
self.assertIn("LibC", lock1["1"]["pref"]) | ||
self.assertEqual(lock1["1"]["requires"], ["2", "3"]) | ||
# Remove one dep in LibC | ||
client.save({"conanfile.py": GenConanfile().with_require_plain("LibA/0.1")}) | ||
client.run("create . LibC/0.1@ --lockfile") | ||
lock2 = json.loads(client.load("conan.lock"))["graph_lock"]["nodes"] | ||
self.assertEqual(4, len(lock2)) | ||
self.assertIn("LibC", lock2["1"]["pref"]) | ||
self.assertEqual(lock2["1"]["requires"], ["2", "3"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters