Skip to content

Commit

Permalink
init: clarify .paths usage in build.zig.zon
Browse files Browse the repository at this point in the history
Clarify the usage of .paths in build.zig.zon. Follow the recommendation
of the comments to explicitly list paths by explicitly listing the paths
in the init project.
  • Loading branch information
rockorager authored and andrewrk committed Jun 6, 2024
1 parent d6eac43 commit ce9d2ed
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/init/build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,17 @@

// Specifies the set of files and directories that are included in this package.
// Only files and directories listed here are included in the `hash` that
// is computed for this package.
// is computed for this package. Only files listed here will remain on disk
// when using the zig package manager. As a rule of thumb, one should list
// files required for compilation plus any license(s).
// Paths are relative to the build root. Use the empty string (`""`) to refer to
// the build root itself.
// A directory listed here means that all files within, recursively, are included.
.paths = .{
// This makes *all* files, recursively, included in this package. It is generally
// better to explicitly list the files and directories instead, to insure that
// fetching from tarballs, file system paths, and version control all result
// in the same contents hash.
"",
"build.zig",
"build.zig.zon",
"src",
// For example...
//"build.zig",
//"build.zig.zon",
//"src",
//"LICENSE",
//"README.md",
},
Expand Down

0 comments on commit ce9d2ed

Please sign in to comment.