Skip to content

Define Scope propagation semantics for real transitive walks #151

Description

@JPDuchesne

Context

Today the Resolver inherits the parent's Scope (group/host/env) onto every transitive declaration as one unit. That is the right default for the current shallow walks (ficsit mod requires ficsit mod), but it is an unexamined choice, not a designed one.

Ecosystem prior art disagrees with itself:

  • Cargo/Bundler: dependency kinds (dev/test) do not propagate — your dep's dev-deps are not your deps. Scope collapses at the first edge.
  • npm: devDependencies of a dependency are not installed, but the top-level scope does gate the whole subtree it introduced.
  • Bazel: visibility/configuration propagates explicitly per edge.

Questions to answer when real transitivity lands:

  1. Does group propagate (our current behavior) or collapse to the declaring project's group at the first edge?
  2. Does a host/env-gated parent gate its whole subtree, and what happens on diamond edges reached from two different scopes (today: first-wins via the resolved-set key, silently)?
  3. Should a transitive edge be allowed to narrow scope (platform-specific sub-deps)?

Acceptance

  • A documented stance in docs/deps-architecture.md (transitive regimes section)
  • Resolver behavior matches the stance, with tests for the diamond-two-scopes case

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    transitivityTransitive dependency resolution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions