Skip to content

remove either std.builtin.Version or std.SemanticVersion #12862

@noiryuh

Description

@noiryuh

Probably because std.SemanticVersion is the rewritten version of std.builtin.Version. But for now, we have 2 structs served for the same purpose (e.g. in build.zig and more)

const zig_version = std.builtin.Version{ .major = 0, .minor = 10, .patch = 0 };
const stack_size = 32 * 1024 * 1024;

pub fn build() !void {
    // ....
    const semver = try std.SemanticVersion.parse(version); // 'version' here is '-Dversion-string'
}

Maybe we can migrate to std.SemanticVersion and deprecate std.builtin.Version to avoid confusing and de-duplicate code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions