# zig build: allow to choose "lazy mode" for fetching process · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/27c1f2b3a04960d9e8701f420560cc53e8e5f1dd)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 27c1f2b3a04960d9e8701f420560cc53e8e5f1dd

Requested commit: 27c1f2b3a04960d9e8701f420560cc53e8e5f1dd

Commit: 27c1f2b3a04960d9e8701f420560cc53e8e5f1dd

Tree: 26c93802f5ede792cb5c1111e8b270a777b5d9d2

Author: Eric Joldasov

Committer: Alex Rønne Petersen

## Message

```
zig build: allow to choose "lazy mode" for fetching process

`--fetch` flag now has additional optional parameter, which specifies
how lazy dependencies should be fetched:
 * `needed` — lazy dependencies are fetched only if they are required
   for current build configuration to work. Default and works same
   as old `--fetch` flag.
 * `all` — lazy dependencies are always fetched. If `--system` flag
   is used after that, it's guaranteed that **any** build configuration
   will not require additional download of dependencies during build.
   Helpful for distro packagers and CI systems:
   https://www.github.com/ziglang/zig/issues/14597#issuecomment-1426827495

If none is passed, behaviour is same as if `needed` was passed.

Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>

```

## Parents

- [b4b1daf0012c3007b762df31028fa35f5f68bd09](https://git.cafe/gitcafe/zig/commit/b4b1daf0012c3007b762df31028fa35f5f68bd09?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/27c1f2b3a04960d9e8701f420560cc53e8e5f1dd?format=markdown)
