-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: editable non-satisfiable (#1251)
Fixes an issue where multiple requirements of editable/non-editable would conflict and cause the lock-file to be non satisfiable. However, the logic should be that if just one requirement specifies an editable install then it should be editable regardless of what other requirements specify. You also get a nice error message: ``` expected bar, and foo to be editable but in the lock-file they are not, whereas baz is NOT expected to be editable which in the lock-file it is ``` Note that I also included several tests that test several cases.
- Loading branch information
1 parent
b283011
commit d3d251b
Showing
15 changed files
with
1,092 additions
and
18 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
9 changes: 9 additions & 0 deletions
9
...__satisfiability__tests__failing_satisiability@expected-editable-multiple__pixi.toml.snap
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,9 @@ | ||
--- | ||
source: src/lock_file/satisfiability.rs | ||
assertion_line: 874 | ||
expression: s | ||
input_file: tests/non-satisfiability/expected-editable-multiple/pixi.toml | ||
--- | ||
environment 'default' does not satisfy the requirements of the project for platform 'win-64 | ||
Diagnostic severity: error | ||
Caused by: expected bar and foo to be editable but in the lock-file but they are not, whereas baz is NOT expected to be editable which in the lock-file it is |
9 changes: 9 additions & 0 deletions
9
...lock_file__satisfiability__tests__failing_satisiability@expected-editable__pixi.toml.snap
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,9 @@ | ||
--- | ||
source: src/lock_file/satisfiability.rs | ||
assertion_line: 874 | ||
expression: s | ||
input_file: tests/non-satisfiability/expected-editable/pixi.toml | ||
--- | ||
environment 'default' does not satisfy the requirements of the project for platform 'win-64 | ||
Diagnostic severity: error | ||
Caused by: expected foo to be editable but in the lock-file it is not |
15 changes: 15 additions & 0 deletions
15
tests/non-satisfiability/expected-editable-multiple/bar/pyproject.toml
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,15 @@ | ||
[project] | ||
name = "bar" | ||
version = "0.1.0" | ||
dependencies = [] | ||
|
||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.pixi.project] | ||
channels = ["conda-forge"] | ||
platforms = ["win-64"] | ||
|
||
[tool.pixi.pypi-dependencies] | ||
bar = { path = ".", editable = true } |
15 changes: 15 additions & 0 deletions
15
tests/non-satisfiability/expected-editable-multiple/baz/pyproject.toml
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,15 @@ | ||
[project] | ||
name = "baz" | ||
version = "0.1.0" | ||
dependencies = [] | ||
|
||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.pixi.project] | ||
channels = ["conda-forge"] | ||
platforms = ["win-64"] | ||
|
||
[tool.pixi.pypi-dependencies] | ||
bar = { path = ".", editable = true } |
15 changes: 15 additions & 0 deletions
15
tests/non-satisfiability/expected-editable-multiple/foo/pyproject.toml
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,15 @@ | ||
[project] | ||
name = "foo" | ||
version = "0.1.0" | ||
dependencies = [] | ||
|
||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.pixi.project] | ||
channels = ["conda-forge"] | ||
platforms = ["win-64"] | ||
|
||
[tool.pixi.pypi-dependencies] | ||
foo = { path = ".", editable = true } |
Oops, something went wrong.