-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
ability to override packages locally #20180
Copy link
Copy link
Closed
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests language modifications. If it also has the "accepted" label then it is planned.This issue suggests language modifications. If it also has the "accepted" label then it is planned.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Milestone
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests language modifications. If it also has the "accepted" label then it is planned.This issue suggests language modifications. If it also has the "accepted" label then it is planned.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Type
Fields
Give feedbackNo fields configured for issues without a type.
#20178 is not technically a prerequisite for this, but the two proposals would work well together.
It would be nice if you could do something like this:
or
then you could make edits to
.zig-cache/p/<pkg hash>that would override the global packages, as well as make it easy to interact with the upstream source control of the dependency.Crucially, these directories are typically not tracked by source control, making the workflow convenient to test a patch to a dependency.
When building with local overrides, a warning should be issued:
When building in
--systemmode, it ignores local overrides with a warning:zig pkg-hash --listwould list all the immediate dependency packages and their hashes:Then you could drill down into the sub-dependencies:
Or maybe
--listwould just print the whole tree.Perhaps another subcommand could do the path calculation, so even if you're in a subdirectory, it would give you the local override path:
This would be a way to quickly find out the command line to pass to e.g.
git clone.Another part of this workflow would be finding out the list of overrides that have mismatching hashes. Perhaps:
zig lop --clean- delete all local overrides with mismatching hasheszig lop --clear- delete all local overrideszig lop --status- list all local overrides, their expected hashes, and actual hashes (when mismatching)Related: