-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use case: ability to declare dependency on single file #17895
Comments
Here's another use case I discovered today. I'm adding a build.zig file to build VVVVVV, and it has a |
This seems like it would be fully solved with |
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. |
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
Many programs make assumptions about how to process the file based on filename extension and just inferring the filename from the URL or using it a random name or a hash might confuse such programs. It would be useful if the user could override the filename the single-file dependency is saved as. For example (continuing with the .dependencies = .{
.template = .{
.url = "https://example.com/headers/api-1.2.3",
.hash = "...",
.unpack = false,
.filename = "api.h",
},
}, |
closes ziglang#17895 Enhances zig with the ability to fetch a dependency of any file type.
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:
The text was updated successfully, but these errors were encountered: