-
Notifications
You must be signed in to change notification settings - Fork 493
feat: Improve error message at missing pixi section #3516
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
Hofer-Julian
merged 14 commits into
prefix-dev:main
from
joyanedel:feat/improve-error-message-at-missing-pixi-section
Apr 11, 2025
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fbc4b24
Add missing pixi section error
joyanedel b5e1cbe
Add TomlError::NoProjectTable for pixi.toml files
joyanedel ddc9de0
Modify help message for nopixi table and noprojecttable toml errors
joyanedel 55f62ed
Change toml error name and logic to be returned from discover method
joyanedel 2adfdc2
Add project section as a required section
joyanedel 488de5c
Update snapshot from test
joyanedel 7c0af31
Merge branch 'main' into feat/improve-error-message-at-missing-pixi-s…
joyanedel 127bd76
Remove created TomlError NoRequiredSection
joyanedel 8eca3fb
Restore ensure_pixi method doc comment
joyanedel 8ef7c05
Update snapshot from non pixi pyporject test
joyanedel 3b22fc6
Change condition to return pyproject manifest workspace discovery err…
joyanedel eaec245
Change snapshot of test that changed behavior
joyanedel e0bdb4e
Merge branch 'main' into feat/improve-error-message-at-missing-pixi-s…
joyanedel 66e07f6
Merge branch 'main' into feat/improve-error-message-at-missing-pixi-s…
baszalmstra 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
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
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
15 changes: 15 additions & 0 deletions
15
...xi_manifest__discovery__test__explicit_workspace_discoverer@missing-tables_pixi.toml.snap
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,15 @@ | ||
| --- | ||
| source: crates/pixi_manifest/src/discovery.rs | ||
| expression: snapshot | ||
| --- | ||
| × Missing table in manifest pixi.toml: | ||
| │ Any of the following sections is required: | ||
| │ * workspace | ||
| │ * project | ||
| │ * package | ||
| ╭─[<CARGO_ROOT>/tests/data/workspace-discovery/missing-tables/pixi.toml:1:1] | ||
| 1 │ # Empty on purpose. | ||
| · ─ | ||
| 2 │ # Explicit discovery should fail with a diagnostic. | ||
| ╰──── | ||
| help: More information about pixi manifest files can be found at https://pixi.sh/latest/reference/pixi_manifest/ |
11 changes: 11 additions & 0 deletions
11
...nifest__discovery__test__explicit_workspace_discoverer@missing-tables_pyproject.toml.snap
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,11 @@ | ||
| --- | ||
| source: crates/pixi_manifest/src/discovery.rs | ||
| expression: snapshot | ||
| --- | ||
| × Missing table in manifest pyproject.toml | ||
| ╭─[<CARGO_ROOT>/tests/data/workspace-discovery/missing-tables/pyproject.toml:1:1] | ||
| 1 │ [project] | ||
| · ─ | ||
| 2 │ name = "malformed" | ||
| ╰──── | ||
| help: Check your manifest for a [tool.pixi.*] table. See https://pixi.sh/latest/python/pyproject_toml for more information. |
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
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,2 @@ | ||
| # Empty on purpose. | ||
| # Explicit discovery should fail with a diagnostic. |
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,3 @@ | ||
| [project] | ||
| name = "malformed" | ||
| version = "0.1.0" |
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.