Skip to content

Add mutual exclusivity validator for source vs legacy fields #1207

Description

@smoparth

Context

PR #1202 activated the source field on PackageSettings and VariantInfo. The design proposal (docs/proposals/new-resolver-config.md, "Migration" section) states:

Top-level and variant-specific source settings are mutually exclusive with download_source, resolver_dist, wheel_server_url, and pre_build settings. It is an error to combine the new source settings with any of the old settings.

Currently there is no validation enforcing this.

Parent epic: #936
Parent issue: #1048

Problem

A user can set both source and legacy fields in the same YAML file without error:

source:
  provider: pypi-sdist
  index_url: https://custom.example/simple
resolver_dist:
  sdist_server_url: https://other.example/simple
  include_wheels: true

The new source field silently takes precedence and the legacy resolver_dist is ignored. This is confusing and can lead to configuration mistakes that are hard to debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions