| author | |
| committer | |
| log | 9602c574e96844aa5e96bc148f340619d9d8730c |
| tree | 98363b19fa4291fd910e1de4939e9e849bb02d4b |
| parent | 81ff8a984327255c471d975433aa7bd434d2e787 |
2 files changed, 16 insertions(+), 15 deletions(-)
src/util/modfile.zig+9-2| ... | ... | @@ -44,14 +44,21 @@ pub const ModFile = struct { |
| 44 | 44 | for (dep_seq.sequence) |item| { |
| 45 | 45 | var dtype: []const u8 = undefined; |
| 46 | 46 | var path: []const u8 = undefined; |
| 47 | var version: []const u8 = undefined; | |
| 47 | 48 | if (item.mapping.get("src")) |val| { |
| 48 | var src_iter = std.mem.split(val.string, " "); | |
| 49 | var src_iter = std.mem.tokenize(val.string, " "); | |
| 49 | 50 | dtype = src_iter.next().?; |
| 50 | 51 | path = src_iter.next().?; |
| 52 | if (src_iter.next()) |dver| { | |
| 53 | version = dver; | |
| 54 | } | |
| 51 | 55 | } else { |
| 52 | 56 | dtype = item.mapping.get("type").?.string; |
| 53 | 57 | path = item.mapping.get("path").?.string; |
| 54 | 58 | } |
| 59 | if (item.mapping.get("version")) |verv| { | |
| 60 | version = verv.string; | |
| 61 | } | |
| 55 | 62 | const dep_type = std.meta.stringToEnum(u.DepType, dtype).?; |
| 56 | 63 | |
| 57 | 64 | try dep_list.append(u.Dep{ |
| ... | ... | @@ -60,7 +67,7 @@ pub const ModFile = struct { |
| 60 | 67 | .id = item.mapping.get_string("id"), |
| 61 | 68 | .name = item.mapping.get_string("name"), |
| 62 | 69 | .main = item.mapping.get_string("main"), |
| 63 | .version = item.mapping.get_string("version"), | |
| 70 | .version = version, | |
| 64 | 71 | .c_include_dirs = try item.mapping.get_string_array(alloc, "c_include_dirs"), |
| 65 | 72 | .c_source_flags = try item.mapping.get_string_array(alloc, "c_source_flags"), |
| 66 | 73 | .c_source_files = try item.mapping.get_string_array(alloc, "c_source_files"), |
zig.mod+7-13| ... | ... | @@ -3,8 +3,7 @@ name: zigmod |
| 3 | 3 | main: src/main.zig |
| 4 | 4 | license: MIT |
| 5 | 5 | dependencies: |
| 6 | - src: git https://github.com/yaml/libyaml | |
| 7 | version: tag-0.2.5 | |
| 6 | - src: git https://github.com/yaml/libyaml tag-0.2.5 | |
| 8 | 7 | id: 8mdbh0zuneb0i3hs5jby5je0heem1i6yxusl7c8y8qx68hqc |
| 9 | 8 | license: MIT |
| 10 | 9 | c_include_dirs: |
| ... | ... | @@ -25,21 +24,16 @@ dependencies: |
| 25 | 24 | - src/scanner.c |
| 26 | 25 | - src/writer.c |
| 27 | 26 | |
| 28 | - src: git https://github.com/nektro/zig-ansi | |
| 29 | version: commit-25039ca | |
| 27 | - src: git https://github.com/nektro/zig-ansi commit-25039ca | |
| 30 | 28 | |
| 31 | 29 | # Entries above this line are needed to bootstrap and kept as git submodules |
| 32 | 30 | # -------- |
| 33 | 31 | # Entries below this line are only fetched with zigmod itself |
| 34 | 32 | |
| 35 | - src: git https://github.com/ziglibs/known-folders | |
| 36 | version: commit-f0f4188 | |
| 33 | - src: git https://github.com/ziglibs/known-folders commit-f0f4188 | |
| 37 | 34 | |
| 38 | - src: git https://github.com/Vexu/zuri | |
| 39 | version: commit-41bcd78 | |
| 35 | - src: git https://github.com/Vexu/zuri commit-41bcd78 | |
| 40 | 36 | |
| 41 | - src: git https://github.com/alexnask/iguanaTLS | |
| 42 | version: commit-2c21764 | |
| 43 | ||
| 44 | - src: git https://github.com/nektro/zig-licenses | |
| 45 | version: commit-73bc493 | |
| 37 | - src: git https://github.com/alexnask/iguanaTLS commit-2c21764 | |
| 38 | ||
| 39 | - src: git https://github.com/nektro/zig-licenses commit-73bc493 |