diff --git a/docs/zig.mod.md b/docs/zig.mod.md index 2d78b7060696f249e642166618845655903128cd..7b8fb47cff5a8d26b749b88db0a60a05c7148a61 100644 --- a/docs/zig.mod.md +++ b/docs/zig.mod.md @@ -44,7 +44,7 @@ Similar to `dependencies` but will only get added to the project if the current This is the object used in the top-level `dependencies` attribute and used to add external code to your project. #### Dep `src` -- Type: `type path` +- Type: `type path ?version` - Example: `git https://github.com/Hejsil/zig-clap` - Required This is the base attribute used to reference external code for use in your project. `type` is an enum and only allows certain values. `path` is the URL or other identifier used to locate the contents of this package based on the `type`. diff --git a/src/util/dep.zig b/src/util/dep.zig index a78058dda12c090c665f7aa1c8c2b945244a3299..223234ecda4223219a2ae7423500b504e94057b9 100644 --- a/src/util/dep.zig +++ b/src/util/dep.zig @@ -23,7 +23,7 @@ pub const Dep = struct { c_source_files: [][]const u8, only_os: [][]const u8, except_os: [][]const u8, - yaml: yaml.Mapping, + yaml: ?yaml.Mapping, pub fn clean_path(self: Dep) ![]const u8 { var p = self.path;