Skip to content

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

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

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

BratishkaErik
Copy link
Contributor

@BratishkaErik BratishkaErik commented May 15, 2024

--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: ability to fetch only needed dependencies #14597 (comment)

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

@BratishkaErik BratishkaErik force-pushed the zig-build/fetch-modes branch from cd1b1ef to 76f5b86 Compare June 17, 2024 18:33
@BratishkaErik BratishkaErik force-pushed the zig-build/fetch-modes branch from 76f5b86 to 66f960a Compare July 3, 2024 08:10
@BratishkaErik BratishkaErik force-pushed the zig-build/fetch-modes branch 2 times, most recently from d4c0a2b to 6acd830 Compare July 30, 2024 08:18
@BratishkaErik BratishkaErik force-pushed the zig-build/fetch-modes branch 3 times, most recently from f39a594 to 1857706 Compare August 22, 2024 22:32
@BratishkaErik BratishkaErik force-pushed the zig-build/fetch-modes branch 2 times, most recently from 8841db9 to 4024f86 Compare September 1, 2024 07:09
@BratishkaErik
Copy link
Contributor Author

aarch64-linux-release failure seems unrelated

@mlugg
Copy link
Member

mlugg commented Dec 25, 2024

Yeah, sorry, that's not your fault -- we're seeing a lot of sporadic CI failures now (see this). I'll re-run the failed job.

`--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 <[email protected]>
@BratishkaErik BratishkaErik force-pushed the zig-build/fetch-modes branch from 275088b to cdf860c Compare March 26, 2025 10:55
@alexrp alexrp enabled auto-merge (rebase) March 26, 2025 11:00
@alexrp alexrp merged commit 27c1f2b into ziglang:master Mar 26, 2025
9 checks passed
@BratishkaErik
Copy link
Contributor Author

Thank you

@BratishkaErik BratishkaErik deleted the zig-build/fetch-modes branch March 26, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants