Skip to content

Commit

Permalink
Promote expected hash changes
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Kubica <marek@tarides.com>
  • Loading branch information
Leonidas-from-XIV committed Oct 10, 2024
1 parent 6e1a5f4 commit 5728b11
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions test/blackbox-tests/test-cases/pkg/check-dependency-hash.t
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Add a non-local dependency to the package:
$ cat dune.lock/lock.dune
(lang package 0.1)

(dependency_hash 69dfdf4e6a7c8489262f9d8b9958c9b3)
(dependency_hash 7c969ef65443f38b2b3b736489d59225)

(repositories
(complete false)
Expand All @@ -72,9 +72,9 @@ Add a second dependency to the project:
Error: Dependency hash in lockdir does not match the hash of non-local
dependencies of this project. The lockdir expects the the non-local
dependencies to hash to:
69dfdf4e6a7c8489262f9d8b9958c9b3
7c969ef65443f38b2b3b736489d59225
...but the non-local dependencies of this project hash to:
0cd7f9253f917ae8182c904fac99c3d9
3ce208bd4511abde4b63d1f23eb3dc52
Hint: Regenerate the lockdir by running 'dune pkg lock'
Error: Some lockdirs do not contain solutions for local packages:
- dune.lock
Expand All @@ -90,7 +90,7 @@ Remove all dependencies from the project:
Lockdir dune.lock does not contain a solution for local packages:
File "dune.lock/lock.dune", line 3, characters 17-49:
Error: This project has no non-local dependencies yet the lockfile contains a
dependency hash: 69dfdf4e6a7c8489262f9d8b9958c9b3
dependency hash: 7c969ef65443f38b2b3b736489d59225
Hint: Regenerate the lockdir by running 'dune pkg lock'
Error: Some lockdirs do not contain solutions for local packages:
- dune.lock
Expand Down
18 changes: 9 additions & 9 deletions test/blackbox-tests/test-cases/pkg/dependency-hash.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ A single package with a single non-local dependency:
> foo))
> EOF
$ dune describe pkg dependency-hash | tee hash1.txt
9f76a6d656fe14d54ba74f864e736dc3
342113efdcc34a7a10e7bd6f70e2463c

Adding another dependency causes the hash to change:
$ cat >dune-project <<EOF
Expand All @@ -52,12 +52,12 @@ Adding another dependency causes the hash to change:
> bar))
> EOF
$ dune describe pkg dependency-hash | tee hash2.txt
142f33129a06ccbebd65a0bad3d94857
832e7a002ca8215a6507963d27b06b01
$ diff hash1.txt hash2.txt
1c1
< 9f76a6d656fe14d54ba74f864e736dc3
< 342113efdcc34a7a10e7bd6f70e2463c
---
> 142f33129a06ccbebd65a0bad3d94857
> 832e7a002ca8215a6507963d27b06b01
[1]

Adding a new local package which depends on one of the existing dependencies
Expand All @@ -75,7 +75,7 @@ doesn't change the hash:
> foo))
> EOF
$ dune describe pkg dependency-hash | tee hash3.txt
142f33129a06ccbebd65a0bad3d94857
832e7a002ca8215a6507963d27b06b01
$ diff hash2.txt hash3.txt

Adding a constraint to one of the dependencies causes the hash to change:
Expand All @@ -92,12 +92,12 @@ Adding a constraint to one of the dependencies causes the hash to change:
> (foo (and :with-test (> 0.1)))))
> EOF
$ dune describe pkg dependency-hash | tee hash4.txt
ecad1d0d60084711169be48b130c9c52
33b01608bfca250def72900422dcea38
$ diff hash3.txt hash4.txt
1c1
< 142f33129a06ccbebd65a0bad3d94857
< 832e7a002ca8215a6507963d27b06b01
---
> ecad1d0d60084711169be48b130c9c52
> 33b01608bfca250def72900422dcea38
[1]

Adding another local package with the same dependency and constraint doesn't
Expand All @@ -119,5 +119,5 @@ change the hash:
> (foo (and :with-test (> 0.1)))))
> EOF
$ dune describe pkg dependency-hash | tee hash5.txt
ecad1d0d60084711169be48b130c9c52
33b01608bfca250def72900422dcea38
$ diff hash4.txt hash5.txt
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/pkg/hash-algos.t
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ first checksum to the lockfile for this package.
$ cat dune.lock/*
(lang package 0.1)

(dependency_hash 4435ebc0724374e2f76349d7a2e7ab6e)
(dependency_hash c911af2d47a04e015a29636a05923f5c)

(repositories
(complete false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Print the contents of each file in the lockdir:

(lang package 0.1)

(dependency_hash ca83e32ab35d71d20fa075b395046c29)
(dependency_hash 0cb770713d87846beb6ba6c5c395b683)

(repositories
(complete false)
Expand Down Expand Up @@ -123,7 +123,7 @@ Run the solver again preferring oldest versions of dependencies:

(lang package 0.1)

(dependency_hash ca83e32ab35d71d20fa075b395046c29)
(dependency_hash 0cb770713d87846beb6ba6c5c395b683)

(repositories
(complete false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Solve the packages again, this time with the variables set.
- static-deps.1.0
(lang package 0.1)

(dependency_hash aea7daa72b636fa3a44973ec5e29d225)
(dependency_hash a1a30b488bcb8ef731895f5f19ecfde7)

(repositories
(complete false)
Expand All @@ -85,7 +85,7 @@ Solve the packages again, this time with the variables set.
- no-deps-b.1.0
(lang package 0.1)

(dependency_hash 6957fba0128609ffc98fac2561c329cb)
(dependency_hash 47ebf1c4f58a56159a2e115555020ae0)

(repositories
(complete false)
Expand All @@ -101,7 +101,7 @@ Solve the packages again, this time with the variables set.
- no-deps-b.1.0
(lang package 0.1)

(dependency_hash 9675a3014e7e2db0f946b3ad2a95c037)
(dependency_hash 7a437f46854c2819ea86daaa4624620e)

(repositories
(complete false)
Expand Down Expand Up @@ -149,7 +149,7 @@ stored in the lockdir metadata:
$ cat dune.lock/lock.dune
(lang package 0.1)

(dependency_hash 72ab96748951e41c88d4ad9673fea081)
(dependency_hash 01f9766396e464df83afd0f30fc0a919)

(repositories
(complete false)
Expand Down

0 comments on commit 5728b11

Please sign in to comment.