karlseguin / http.zig

An HTTP/1.1 server for zig
MIT License
513 stars 38 forks source link

unable to install. unable to discover remote git server capabilities: ProtocolError #65

Closed Tenari closed 1 month ago

Tenari commented 1 month ago

my build.zig.zon

.{
    .name = "combatrpg_server",
    .version = "0.0.0",
    .dependencies = .{
        .httpz = .{
            .url = "git+https://github.com/karlseguin/httpz.zig#master",
        },
    },
    .paths = .{""},
}

my build.zig

const std = @import("std");

pub fn build(b: *std.Build) void {
    const exe = b.addExecutable(.{
        .name = "combatrpg_server",
        .root_source_file = b.path("src/server.zig"),
        .target = b.host,
    });

    const httpz = b.dependency("httpz", .{
        .target = b.host,
        .optimize = b.standardOptimizeOption(.{}),
    });
    exe.root_module.addImport("httpz", httpz.module("httpz"));

    b.installArtifact(exe);
}

my error:

zig build --summary all
/Users/tenari/code/combatrpg/serverbuild.zig.zon:6:20: error: unable to discover remote git server capabilities: ProtocolError
            .url = "git+https://github.com/karlseguin/httpz.zig#master",
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tenari commented 1 month ago

I am new to zig, so sorry if I'm doing something simple/obvious wrong, but I think I followed the instructions in the README correctly.

karlseguin commented 1 month ago

It should be git+https://github.com/karlseguin/http.zig#master (http.zig not httpz.zig). I fixed the readme. This happened a week or so ago when I [poorly] updated the readme.

Tenari commented 1 month ago

@karlseguin this change fixed it for me, but I don't see the readme updated fyi

image