Repository navigation
use case: ability to declare dependency on single file #17895
Description
Activity
- addedproposalThis 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 managementuse caseDescribes a real use case that is difficult or impossible, but does not propose a solution.Describes a real use case that is difficult or impossible, but does not propose a solution.
on Nov 6, 2023 Here's another use case I discovered today. I'm adding a build.zig file to build VVVVVV, and it has a
data.zipyou can download with free assets and levels. I added thedata.ziptobuild.zig.zon, but the game actually needs the zip file, not the extracted contents. To solve this I "re-zip" the contents and install them to the bin directory for the game to load, however, if there was a way to instead download the zip file as just a "file", this would remove some unnecessary steps.Reacted by square- addedacceptedThis proposal is planned.This proposal is planned.and removeduse caseDescribes a real use case that is difficult or impossible, but does not propose a solution.Describes a real use case that is difficult or impossible, but does not propose a solution.
on Sep 15, 2024 This seems like it would be fully solved with
.unpack = false,yeah?Reacted by Jonathan Marler, johan0A and rpkakReacted by Eric Joldasov, InKryption, johan0A and rpkak- addedcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.
on Sep 15, 2024 I think I'll put together a PR for this imminently as I now have a real need for it, unsupported archive formats. With the ability to disable unpacking an archive, this unlocks the ability to download an archive in any format. It can then be extracted via another dependency.
More specifically, I'm converting my win32metdata to JSON converter from C# to zig and the metadata itself is a nuget package. With this "unpack" option I can just download the nupkg file and extract it with my own extraction tool.
- added 3 commits that reference this issue
on Nov 21, 2024 9 remaining items
- added a commit that references this issue
on Nov 22, 2024 - added 3 commits that reference this issue
on Feb 24, 2025 - added 6 commits that reference this issue
on Jul 6, 2025 - addedenhancementSolving 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.and removedproposalThis 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.acceptedThis proposal is planned.This proposal is planned.
on Apr 22, 2026
ZLS depends on Zig's langref.html.in file to extract the set of a builtin function.
Right now, this file is being manually downloaded during the build phase which does not integrate well with Zig's package manager and caching system. GitHub can't provide that file as a compressed tarball and fetching the entire repository source code is too wasteful.
It would be nice if there was a way to declare it as dependency to build.zig.zon: