Skip to content

feat: add the conda-script block model to pixi_manifest - #6907

Open
Hofer-Julian wants to merge 1 commit into
mainfrom
conda-script-parser
Open

feat: add the conda-script block model to pixi_manifest#6907
Hofer-Julian wants to merge 1 commit into
mainfrom
conda-script-parser

Conversation

@Hofer-Julian

@Hofer-Julian Hofer-Julian commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

First slice of the conda-script proposal (#3751): the /// conda-script comment block parsed as a script manifest next to the PEP 723 one.

  • pixi_manifest::script splits into machinery both block kinds share (comment-prefix stripping, source maps for diagnostics, serializing edits back into the block) and one submodule per kind
  • TOML model: channels, entrypoint (string or platform table), [dependencies] restricted to the keys the spec defines, [tool.pixi] with dependencies and pypi-dependencies
  • Errors for unterminated blocks, multiple blocks and files mixing a PEP 723 block with a conda-script block
  • Edits round-trip: metadata_document exposes the block as TOML and write_metadata writes it back through the comment prefix

Considerations before merging

  • The spec allows url combined with when for cross-platform URL pinning, but pixi cannot attach conditions to URL specs yet, so the parser rejects the combination with a "not supported yet" error instead

@Hofer-Julian Hofer-Julian changed the title conda script parser feat: add the pixi_conda_script crate with the block parser and TOML model Aug 27, 2026
@Hofer-Julian
Hofer-Julian force-pushed the conda-script-parser branch 2 times, most recently from fe4a43d to 9d4a9b3 Compare August 27, 2026 15:30
@Hofer-Julian Hofer-Julian changed the title feat: add the pixi_conda_script crate with the block parser and TOML model feat: add the conda-script block model to pixi_manifest Aug 31, 2026
The first piece of the `conda-script` proposal (#3751): the
`/// conda-script` comment block parsed as a script manifest next to the
PEP 723 one. `script::block` holds the machinery both kinds share:
comment-prefix stripping, source maps for diagnostics and serializing
edits back into the block.

The model covers `channels`, `entrypoint` (string or platform table),
`[dependencies]` restricted to the keys the spec defines, and
`[tool.pixi]` with `dependencies` and `pypi-dependencies`. Edits
round-trip: `metadata_document` exposes the block as TOML and
`write_metadata` writes it back through the comment prefix.
@Hofer-Julian
Hofer-Julian marked this pull request as ready for review August 31, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant