-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in dependency traversal order (#1445)
* Fix bug in solution traversal related to linked releases * New test * CI fixes
- Loading branch information
Showing
4 changed files
with
48 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
Check that a linked dependency is considered during solution traversal | ||
""" | ||
|
||
from glob import glob | ||
import re | ||
from drivers.alr import alr_with, init_local_crate, run_alr | ||
from drivers.asserts import assert_eq, assert_match | ||
|
||
run_alr("get", "libhello") | ||
init_local_crate() | ||
run_alr("with", f"--use={glob('../libhello_*')[0]}") | ||
alr_with("hello") # Libhello is already linked | ||
|
||
# Verify the solution is as expected | ||
p = run_alr("with", "--solve", quiet=False) | ||
assert_match(".*" + re.escape("""\ | ||
Dependencies (solution): | ||
hello=1.0.1 (origin: filesystem) | ||
libhello=1.0.0 (pinned) (origin: ../libhello_1.0.0_filesystem) | ||
"""), | ||
p.out) | ||
|
||
# Verify that linked libhello prevents visiting hello too soon. This depends on | ||
# debug output which is not very nice but there's no simple alternative. | ||
p = run_alr("-vv", "build", quiet=False) | ||
|
||
assert_match(".*Round 1: SKIP not-ready hello=1.0.1" | ||
".*Round 1: VISIT ready libhello=1.0.0" | ||
".*Round 2: VISIT ready hello=1.0.1", | ||
p.out) | ||
|
||
print('SUCCESS') |
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,3 @@ | ||
driver: python-script | ||
indexes: | ||
basic_index: {} |