Skip to content

package manager: zig fetch --save <url> overwrites .lazy field #19725

@emidoots

Description

@emidoots

Zig Version

0.12.0-dev.3180+83e578a18

Steps to Reproduce and Observed Behavior

With a build.zig.zon file which contains a lazy dependency like:

    .dependencies = .{
        .glfw = .{
            .url = "https://pkg.machengine.org/glfw/8f7ca982913c0ab64df44d79d6ad2fb592e5ec39.tar.gz",
            .hash = "122085745c053e68fea3772c7239c7c87bcc7f042fa3189592b30e0e39cbb9603d79",
            .lazy = true,
        },
    },
zig fetch --save https://pkg.machengine.org/glfw/98b4bca1542156dcedc6ab87b365a7ac61d1b77b.tar.gz

will remove the .lazy field:

image

Expected Behavior

The .lazy field should remain in place, only the .url and .hash fields should be overwritten.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions