doc: mention zig can't use URLs if their content changes

There's been some proliferation of dependency URLs that reference
mutable data such as links to git branches that can change.  This has
resulted in broken projects, i.e.

* 9eef9de94c/build.zig.zon
* 4b64353e9c

There's also disagreement about whether it's fine for URL's to point to
git branches, i.e.

https://github.com/Not-Nik/raylib-zig/pull/130

This updates the docs to mention that zig won't be able to use URLs if
their content changes.
This commit is contained in:
Jonathan Marler 2024-08-17 19:29:26 -06:00 committed by Andrew Kelley
parent 0ff0bdb4a7
commit 77c63ac360
2 changed files with 4 additions and 2 deletions

View File

@ -47,7 +47,8 @@ String.
When updating this field to a new URL, be sure to delete the corresponding When updating this field to a new URL, be sure to delete the corresponding
`hash`, otherwise you are communicating that you expect to find the old hash at `hash`, otherwise you are communicating that you expect to find the old hash at
the new URL. the new URL. If the contents of a URL change this will result in a hash mismatch
which will prevent zig from using it.
#### `hash` #### `hash`

View File

@ -27,7 +27,8 @@
//.example = .{ //.example = .{
// // When updating this field to a new URL, be sure to delete the corresponding // // When updating this field to a new URL, be sure to delete the corresponding
// // `hash`, otherwise you are communicating that you expect to find the old hash at // // `hash`, otherwise you are communicating that you expect to find the old hash at
// // the new URL. // // the new URL. If the contents of a URL change this will result in a hash mismatch
// // which will prevent zig from using it.
// .url = "https://example.com/foo.tar.gz", // .url = "https://example.com/foo.tar.gz",
// //
// // This is computed from the file contents of the directory of files that is // // This is computed from the file contents of the directory of files that is