Skip to content

new package hash format "Legacy format" is supported only for packages that do not have '-' in their names #23100

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

Open
fautore opened this issue Mar 5, 2025 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@fautore
Copy link

fautore commented Mar 5, 2025

Zig Version

0.14.0

Steps to Reproduce and Observed Behavior

As of #22994 Zig packages that depend on packages that have - in their name error on zig build and zig fetch.

Example:

# this is fine -> legacy is supported
zig fetch --save git+https://github.com/zig-gamedev/zemscripten.git 

# this errors -> legacy is not supported
zig fetch --save git+https://github.com/kristoff-it/zig-live-webserver.git

Likewise, adding only zemscripten as a dependency on build.zig.zon does not error on build, but adding

        .@"live-webserver" = .{
            .url = "git+https://github.com/kristoff-it/zig-live-webserver.git#203bf71534978568fc1322be51cb3aa500fb2953",
            .hash = "1220bdac81725ecdad9a029dc05dd9a05bf7d6bc21a1eba8f8eddfbfdb742340404e",
        },

errors on build.

Both zemscripten and live-webserver haven't been updated to work for this new package format YET, which makes them prime examples of dependencies that can suddenly break builds, but they are certainly not the only one with this problem.

I am aware that package maintainers could update their packages once 0.14.0 is rolled out, but that makes it hard for "dead" or "archived" packages or packages that are slow to adapt to the new zig version.

Expected Behavior

Both #20178 and #22994 mention Legacy support.
But as it stands it's a "half" legacy support, expected behavior for packages that have - in their names should be a warning during the grace period and THEN error after the grace period ends.

@fautore fautore added the bug Observed behavior contradicts documented or intended behavior label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

1 participant