Skip to content

feat: build with the exclude-newer of the workspace in pixi publish - #7386

Open
pavelzw wants to merge 1 commit into
default-exclude-newerfrom
publish-exclude-newer
Open

pavelzw wants to merge 1 commit into
default-exclude-newerfrom
publish-exclude-newer

Conversation

@pavelzw

@pavelzw pavelzw commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Stacked on #7385.

pixi publish (and pixi build, which forwards to it) built with exclude_newer: None, so neither the workspace's exclude-newer nor any other cutoff applied to the build and host dependencies of published packages. The same package built as a source dependency of the workspace did honor the cutoff, so publish could build against packages the workspace considers too new.

Publish now resolves the exclude-newer of the workspace's default environment (with channel cutoffs and exemptions, like a solve of that environment) and passes it to both the backend metadata and the package builds.

Standalone packages

Publishing a package without a workspace isn't supported yet: pixi publish on a package-only pixi.toml or a bare recipe.yaml fails with could not find pixi.toml or pyproject.toml with tool.pixi. Once it is, such a build has no manifest cutoff, and the default-exclude-newer of the configuration (#7385) is the natural fallback, like for pixi exec. That's not part of this PR, as there is no code path for it yet.

How Has This Been Tested?

Integration test: a package with a host dependency from a channel whose packages are all newer than the channel's exclude-newer fails to publish with "uploaded after the cutoff date", and publishes once the cutoff is removed.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude Code

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@pavelzw
pavelzw added this pull request to stack #7364 October 28, 2026 01:48
@pavelzw
pavelzw force-pushed the publish-exclude-newer branch from f916e78 to 5c82a0a Compare October 28, 2026 01:54
Comment on lines -685 to +687
// When running `pixi publish`, the exclude_newer config is ignored;
// it only matters when using the package as a source dependency.
// Build with the `exclude-newer` of the workspace, the same cutoff that
// applies when the package is built as a source dependency of the
// workspace.

@pavelzw pavelzw Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now, pixi publish only works if there is a workspace anyway. in that case, we can also use the exclude-newer from said workspace.
might make things simpler?

@pavelzw
pavelzw marked this pull request as ready for review October 28, 2026 01:55
@pavelzw
pavelzw requested a review from lucascolley October 28, 2026 01:56
@pavelzw
pavelzw force-pushed the publish-exclude-newer branch from 5c82a0a to 99ab6b6 Compare October 28, 2026 08:18
@pavelzw
pavelzw force-pushed the publish-exclude-newer branch 2 times, most recently from 886fda3 to 96607f6 Compare October 28, 2026 14:26
@lucascolley
lucascolley force-pushed the publish-exclude-newer branch from 96607f6 to a95ba2c Compare October 28, 2026 14:58
@pavelzw
pavelzw force-pushed the publish-exclude-newer branch from a95ba2c to 0bac1fc Compare October 30, 2026 17:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants