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

zig fetch: add support for SHA-256 Git repositories #22222

Merged
merged 4 commits into from
Dec 14, 2024

Conversation

ianprime0509
Copy link
Contributor

@ianprime0509 ianprime0509 commented Dec 13, 2024

Closes #21888

Note: I cherry-picked two commits from #21931 to ensure the Git tests updated in this PR are actually executed (one to execute the tests, and one to fix an unrelated issue causing some tests to fail due to undefined behavior). Those commits can be removed from this PR without impacting anything else if it's not desired.

I tried the following fetches as tests of the updated logic. Currently, Codeberg is the only Git hosting service I'm aware of which supports SHA-256 repositories, but if anyone is aware of others, I'd be happy to test them as well.

  • SHA-1:
    • zig fetch git+https://github.com/ianprime0509/zig-xml
    • zig fetch git+https://github.com/ianprime0509/zig-xml#main
    • zig fetch git+https://github.com/ianprime0509/zig-xml#5656de48d8febd88f80ca9876591a2bec4daffad
    • zig fetch git+https://gitlab.gnome.org/GNOME/libxml2
    • zig fetch git+https://codeberg.org/ziglings/exercises
    • zig fetch git+https://git.sr.ht/~leon_plickat/zig-spoon
    • zig fetch git+https://bitbucket.org/archaistvolts2/zig-btree
  • SHA-256:
    • zig fetch git+https://codeberg.org/GalaxyShard/zig-nds-bindings
    • zig fetch git+https://codeberg.org/GalaxyShard/zig-nds-bindings#main
    • zig fetch git+https://codeberg.org/GalaxyShard/zig-nds-bindings#297a06aab678414a350cc9bb68b5705b9969913601397c065dc847e1610d2200

castholm and others added 4 commits December 13, 2024 08:49
There are several test decls inside `/src` that are not currently being
tested and have bitrotted as a result. This commit revives those tests
and adds the `test-compiler-internals` set of tests which tests
everything reachable from `/src/main.zig`.
It was added to the standard library in ziglang#18733.
@andrewrk andrewrk merged commit 13a2834 into ziglang:master Dec 14, 2024
9 of 10 checks passed
@andrewrk
Copy link
Member

Thanks!

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. zig build system std.Build, the build runner, `zig build` subcommand, package management release notes This PR should be mentioned in the release notes. labels Dec 14, 2024
@ianprime0509 ianprime0509 deleted the git-sha256 branch December 14, 2024 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. release notes This PR should be mentioned in the release notes. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zig fetch errors with sha256 git repositories
3 participants