Skip to content

add tooling to deal with build.zig dependency trees #14288

@andrewrk

Description

@andrewrk

Extracted from #14265.

Terminology clarification: #14307

Add subcommands for dealing with the following situations:

  • user wants to add a new dependency zig fetch --save
  • user wants to remove a dependency
  • user wants to check for updates to dependency tree
  • user wants to update one or more dependencies

A conflict occurs when dependency tree contains multiple projects with the same id, but different version.

Add conflict resolution logic. This could go one of two ways:

  • The maximum version number is chosen but only among those projects actually referred to in the dependency tree by url/hash.
  • User must explicitly specify how all conflicts are to be resolved whenever a conflict occurs. Conflict resolution data goes into build.zig.zon.
    • For each dependency on a project which has conflicts in the tree, user may choose that dependency to resolve to any project that exists within the dependency tree that has the same id, and a version that is greater or equal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    Status

    Uncategorized

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions