aboutsummaryrefslogtreecommitdiff
path: root/src/Package
AgeCommit message (Collapse)Author
2025-10-30std.debug.lockStderrWriter: also return ttyconfMatthew Lugg
`std.Io.tty.Config.detect` may be an expensive check (e.g. involving syscalls), and doing it every time we need to print isn't really necessary; under normal usage, we can compute the value once and cache it for the whole program's execution. Since anyone outputting to stderr may reasonably want this information (in fact they are very likely to), it makes sense to cache it and return it from `lockStderrWriter`. Call sites who do not need it will experience no significant overhead, and can just ignore the TTY config with a `const w, _` destructure.
2025-10-29compiler: upgrade unit tests to new APIAndrew Kelley
2025-10-29compiler: update for introduction of std.IoAndrew Kelley
only thing remaining is using libc dns resolution when linking libc
2025-10-03compiler: control the s390x backchain feature through the frame pointer optionAlex Rønne Petersen
This is a little different from how C/C++ compilers do this, but I think it's justified because it's what users actually *mean* when the use frame pointer options. This is another one of those LLVM "CPU" features that have nothing to do with CPU at all and should really be a TargetMachine option or something. One day we'll figure out a better way of dealing with these...
2025-09-30Fix zig build lazy -> eager dependency promotionTimothy Bess
Before, this had a subtle ordering bug where duplicate deps that are specified as both lazy and eager in different parts of the dependency tree end up not getting fetched depending on the ordering. I modified it to resubmit lazy deps that were promoted to eager for fetching so that it will be around for the builds that expect it to be eager downstream of this.
2025-08-30Merge pull request #25077 from ziglang/GenericReaderAndrew Kelley
std.Io: delete GenericReader, AnyReader, FixedBufferStream; and related API breakage
2025-08-30rework std.Io.Writer.Allocating to support runtime-known alignmentAndrew Kelley
Also, breaking API changes to: * std.fs.Dir.readFileAlloc * std.fs.Dir.readFileAllocOptions
2025-08-30compiler: remove medium code model workaround for loongarch64Alex Rønne Petersen
The default was changed in LLVM 21.
2025-08-29std.Io: delete GenericReaderAndrew Kelley
and delete deprecated alias std.io
2025-08-28compiler: update to not use GenericWriterAndrew Kelley
2025-08-26fetch: update xz API usageAndrew Kelley
2025-08-16Merge pull request #24874 from ziglang/tls-clientAndrew Kelley
std: more reliable HTTP and TLS networking
2025-08-16Compilation: remove last instance of deprecatedReaderAndrew Kelley
This also makes initStreaming preemptively disable file size checking.
2025-08-16Fetch: bump zstd decompression bufferAndrew Kelley
see #24735
2025-08-13std.io.Writer.Allocating: rename getWritten() to written()Isaac Freund
This "get" is useless noise and was copied from FixedBufferWriter. Since this API has not yet landed in a release, now is a good time to make the breaking change to fix this.
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-09Merge pull request #24743 from ziglang/BufferedWriterAndrew Kelley
std.Io: delete BufferedWriter
2025-08-08Fetch.git: fix FetchStream packet readingIan Johnson
Progress towards #24732
2025-08-08std.Io: remove BufferedWriterAndrew Kelley
2025-08-08Fetch.git: replace a toss with discardAllAndrew Kelley
toss is only valid following a peek.
2025-08-08compiler: improve error reportingmlugg
The functions `Compilation.create` and `Compilation.update` previously returned inferred error sets, which had built up a lot of crap over time. This meant that certain error conditions -- particularly certain filesystem errors -- were not being reported properly (at best the CLI would just print the error name). This was also a problem in sub-compilations, where at times only the error name -- which might just be something like `LinkFailed` -- would be visible. This commit makes the error handling here more disciplined by introducing concrete error sets to these functions (and a few more as a consequence). These error sets are small: errors in `update` are almost all reported via compile errors, and errors in `create` are reported through a new `Compilation.CreateDiagnostic` type, a tagged union of possible error cases. This allows for better error reporting. Sub-compilations also report errors more correctly in several cases, leading to more informative errors in the case of compiler bugs. Also fixes some race conditions in library building by replacing calls to `setMiscFailure` with calls to `lockAndSetMiscFailure`. Compilation of libraries such as libc happens on the thread pool, so the logic must synchronize its access to shared `Compilation` state.
2025-08-07Fetch: fix FetchStream logicAndrew Kelley
2025-08-07Fetch: make FetchStream live longerAndrew Kelley
2025-08-07Fetch: handle compressed git+httpAndrew Kelley
2025-08-07TLS, HTTP, and package fetching fixesAndrew Kelley
* TLS: add missing assert for output buffer length requirement * TLS: add missing flushes * TLS: add flush implementation * TLS: finish drain implementation * HTTP: correct buffer sizes for TLS * HTTP: expose a getReadError method on Connection * HTTP: add missing flush on sendBodyComplete * Fetch: remove unwanted deinit * Fetch: improve error reporting
2025-08-07fetch: avoid copying ResourceAndrew Kelley
2025-08-07std.Io: delete BufferedReaderAndrew Kelley
2025-08-07fetch: update for new http APIAndrew Kelley
it's not quite finished because I need to make it not copy the Resource
2025-08-07Merge pull request #24199 from Justus2308/24106-fmt-castsMatthew Lugg
zig fmt: canonicalize nested cast builtin order
2025-08-04std.compress.flate.Decompress: return correct size for unbuffered decompressionIan Johnson
Closes #24686 As a bonus, this commit also makes the `git.zig` "testing `main`" compile again.
2025-08-03zig fmt: apply new cast builtin orderJustus Klausecker
2025-07-31fetch: More Git fixesIan Johnson
2025-07-31fetch: remove checksum logic and fix new I/O API bugsAndrew Kelley
Thanks Ian Johnson for finding these
2025-07-31fetch: update API usageAndrew Kelley
2025-07-31compiler: fix unit test compile errorsAndrew Kelley
sorry, zip file creation has regressed because std lib no longer has a deflate compression implementation
2025-07-31compiler: update to new flate APIAndrew Kelley
2025-07-31fetch: remove calls to fsyncAndrew Kelley
fsync blocks until the contents have been actually written to disk, which would be useful if we didn't want to report success until having achieved durability. But the OS will ensure coherency; i.e. if one process writes stuff without calling fsync, then another process reads that stuff, the writes will be seen even if they didn't get flushed to disk yet. Since this code deals with ephemeral cache data, it's not worth trying to achieve this kind of durability guarantee. This is consistent with all the other tooling on the system. Certainly, if we wanted to change our stance on this, it would not be something that affects only the git fetching logic.
2025-07-26aarch64: implement stack probingJacob Young
2025-07-25std: rework zstd for new I/O APIAndrew Kelley
This passes tests but it doesn't provide as big a window size as is required to decompress larger streams. The next commit in this branch will work towards that, without introducing an additional buffer.
2025-07-22give the Reader API adapter a bufferAndrew Kelley
it needs one or else it always asserts
2025-07-22std.tar: update to new I/O APIAndrew Kelley
2025-07-16update compilerAndrew Kelley
2025-07-07update compiler unit tests to new APIAndrew Kelley
2025-07-07std.io.Writer.printValue: rework logicAndrew Kelley
Alignment and fill options only apply to numbers. Rework the implementation to mainly branch on the format string rather than the type information. This is more straightforward to maintain and more straightforward for comptime evaluation. Enums support being printed as decimal, hexadecimal, octal, and binary. `formatInteger` is another possible format method that is unconditionally called when the value type is struct and one of the integer-printing format specifiers are used.
2025-07-07std.fmt: fully remove format string from format methodsAndrew Kelley
Introduces `std.fmt.alt` which is a helper for calling alternate format methods besides one named "format".
2025-07-07compiler: update a bunch of format stringsAndrew Kelley
2025-07-07compiler: fix a bunch of format stringsAndrew Kelley
2025-07-07compiler: fix a bunch of format stringsAndrew Kelley
2025-07-07update compiler source to new APIsAndrew Kelley
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string