-
Notifications
You must be signed in to change notification settings - Fork 460
Deduplicate solver errors when generating portable lockdirs #12642
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
86 changes: 86 additions & 0 deletions
86
test/blackbox-tests/test-cases/pkg/portable-lockdirs/portable-lockdirs-no-solution.t
This file contains hidden or 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,86 @@ | ||
| Demonstrate the case where a project can't be solved at all. | ||
|
|
||
| $ . ../helpers.sh | ||
| $ mkrepo | ||
| $ add_mock_repo_if_needed | ||
|
|
||
| Make some packages that can't be coinstalled: | ||
| $ mkpkg a <<EOF | ||
| > depends: [ | ||
| > "c" {= "0.1"} | ||
| > ] | ||
| > EOF | ||
|
|
||
| $ mkpkg b <<EOF | ||
| > depends: [ | ||
| > "c" {= "0.2"} | ||
| > ] | ||
| > EOF | ||
|
|
||
| $ mkpkg c "0.2" | ||
|
|
||
| Depend on a pair of packages which can't be coinstalled: | ||
| $ cat > dune-project <<EOF | ||
| > (lang dune 3.18) | ||
| > (package | ||
| > (name foo) | ||
| > (depends a b)) | ||
| > EOF | ||
|
|
||
| Solver error when solving fails with the same error on all platforms: | ||
| $ DUNE_CONFIG__PORTABLE_LOCK_DIR=enabled dune pkg lock | ||
| Error: | ||
| Unable to solve dependencies while generating lock directory: dune.lock | ||
|
|
||
| The dependency solver failed to find a solution for the following platforms: | ||
| - arch = x86_64; os = linux | ||
| - arch = arm64; os = linux | ||
| - arch = x86_64; os = macos | ||
| - arch = arm64; os = macos | ||
| - arch = x86_64; os = win32 | ||
| ...with this error: | ||
| Couldn't solve the package dependency formula. | ||
| Selected candidates: a.0.0.1 b.0.0.1 foo.dev | ||
| - c -> (problem) | ||
| a 0.0.1 requires = 0.1 | ||
| Rejected candidates: | ||
| c.0.2: Incompatible with restriction: = 0.1 | ||
| [1] | ||
|
|
||
| Modify the "a" package so the solver error is different on different platforms: | ||
| $ mkpkg a <<EOF | ||
| > depends: [ | ||
| > "c" {= "0.1" & os = "linux"} | ||
| > "c" {= "0.3" & os != "linux"} | ||
| > ] | ||
| > EOF | ||
|
|
||
| This time there will be two different solver errors. Both will be printed along | ||
| with the platforms where they are relevant: | ||
| $ DUNE_CONFIG__PORTABLE_LOCK_DIR=enabled dune pkg lock | ||
| Error: | ||
| Unable to solve dependencies while generating lock directory: dune.lock | ||
|
|
||
| The dependency solver failed to find a solution for the following platforms: | ||
| - arch = x86_64; os = linux | ||
| - arch = arm64; os = linux | ||
| ...with this error: | ||
| Couldn't solve the package dependency formula. | ||
| Selected candidates: a.0.0.1 b.0.0.1 foo.dev | ||
| - c -> (problem) | ||
| a 0.0.1 requires = 0.1 | ||
| Rejected candidates: | ||
| c.0.2: Incompatible with restriction: = 0.1 | ||
|
|
||
| The dependency solver failed to find a solution for the following platforms: | ||
| - arch = x86_64; os = macos | ||
| - arch = arm64; os = macos | ||
| - arch = x86_64; os = win32 | ||
| ...with this error: | ||
| Couldn't solve the package dependency formula. | ||
| Selected candidates: a.0.0.1 b.0.0.1 foo.dev | ||
| - c -> (problem) | ||
| a 0.0.1 requires = 0.3 | ||
| Rejected candidates: | ||
| c.0.2: Incompatible with restriction: = 0.3 | ||
| [1] | ||
ElectreAAS marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.