Skip to content
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

Cannot build Zap #112

Open
Fyphen1223 opened this issue Jun 17, 2024 · 0 comments
Open

Cannot build Zap #112

Fyphen1223 opened this issue Jun 17, 2024 · 0 comments

Comments

@Fyphen1223
Copy link

This is the log:

/workspaces/ZigStream/build.zig:44:8: error: no field or member function named 'addModule' in 'Build.Step.Compile'
    exe.addModule("zap", zap.module("zap"));
    ~~~^~~~~~~~~~
/home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/std/Build/Step/Compile.zig:1:1: note: struct declared here
const builtin = @import("builtin");
^~~~~
referenced by:
    runBuild__anon_8818: /home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/std/Build.zig:2116:27
    main: /home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/compiler/build_runner.zig:301:29
    remaining reference traces hidden; use '-freference-trace' to see all reference traces
/home/codespace/.cache/zig/p/12203126ff24e8018655eb7444c91f0d527d1213af16fcf2a578281abc994d01cc46/build.zig:24:33: error: no field named 'path' in union 'Build.LazyPath'
        .root_source_file = .{ .path = "src/zap.zig" },
                                ^~~~
/home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/std/Build.zig:2171:22: note: union declared here
pub const LazyPath = union(enum) {
                     ^~~~~

This is my build.zig.zon:

.{
    // This is the default name used by packages depending on this one. For
    // example, when a user runs `zig fetch --save <url>`, this field is used
    // as the key in the `dependencies` table. Although the user can choose a
    // different name, most users will stick with this provided value.
    //
    // It is redundant to include "zig" in this name because it is already
    // within the Zig package namespace.
    .name = "ZigStream",

    // This is a [Semantic Version](https://semver.org/).
    // In a future version of Zig it will be used for package deduplication.
    .version = "0.0.1",

    // This field is optional.
    // This is currently advisory only; Zig does not yet do anything
    // with this value.
    //.minimum_zig_version = "0.11.0",

    // This field is optional.
    // Each dependency must either provide a `url` and `hash`, or a `path`.
    // `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
    // Once all dependencies are fetched, `zig build` no longer requires
    // internet connectivity.
    .dependencies = .{
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/3f9c7d0f6b19a2ae32ba5e1a58681512c6ffc86d.tar.gz",
            .hash = "12203126ff24e8018655eb7444c91f0d527d1213af16fcf2a578281abc994d01cc46",
        },
    },
    .paths = .{
        "",
    },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant