22188 Commits

Author SHA1 Message Date
Andrew Kelley
d4e829d0a0 std.tar: add strip_components option 2023-01-11 15:39:49 -08:00
Andrew Kelley
f104cfa1eb compiler: add package manager skeleton
see #943
2023-01-11 15:39:48 -08:00
Andrew Kelley
585b9970ef add std.tar for tar file unpacking 2023-01-11 15:39:48 -08:00
Andrew Kelley
4f6981bbe3 add std.Ini for basic .ini file parsing 2023-01-11 15:39:48 -08:00
Andrew Kelley
f945c2a1c8 expose std.io.bufferedReaderSize
This allows setting a custom buffer size. In this case I wanted it
because using a buffer size large enough to fit a TLS ciphertext record
elides a memcpy().

This commit also adds `readAtLeast` to the Reader interface.
2023-01-11 15:39:48 -08:00
Andrew Kelley
c50f65304f std.http.Client: support the Reader interface 2023-01-11 15:39:48 -08:00
Andrew Kelley
da6d79c47c water cooler complaint about gzip stream namespace 2023-01-11 15:39:48 -08:00
Eckhart Köppen
c2d37224c8 zig objcopy: Fix corrupted hex output
Do not return stack local data for hex record payload data.
2023-01-11 21:15:20 +02:00
Loris Cro
0e66df2094 autodoc: scroll up when collapsing long fn description 2023-01-11 18:14:56 +01:00
Loris Cro
a88679453a
Merge pull request #14263 from der-teufel-programming/master
autodoc: Fix function pointers rendering issue
2023-01-11 17:33:09 +01:00
Der Teufel
669982c145 autodoc: Fix function pointers rendering issue 2023-01-11 03:31:16 +01:00
praschke
3ab43988c1 std.net: check for localhost names before asking DNS
the old implementation asks DNS before checking if it shouldn't.
additionally, it did not catch absolute 'localhost.' names.
2023-01-10 18:09:07 -05:00
Andrew Kelley
9b807f9c17
Merge pull request #14247 from kcbanner/windows_improve_module_lookup
Windows debug info lookup improvements
2023-01-10 18:08:12 -05:00
kcbanner
bb4cb34204 test: fix "chdir smoke test" comparing paths with potentially different drive letter cases 2023-01-10 18:03:05 -05:00
Techatrix
0a8b7ad368
langref: fix unclosed and lonely tag (#14250) 2023-01-10 18:02:29 -05:00
Frank Denis
24d8d12caf Update wasi-libc to a1c7c2c7a4b2813c6f67bd2ef6e0f430d31cebad
Some notable changes:
- `ENOENT` is returned instead of `ENOTCAPABLE` when a path has not
be pre-opened (https://github.com/WebAssembly/wasi-libc/pull/370)
- `fd_readdir()`: some implementations may not set the inode number,
so an additional call to `fstatat()` is now done in order to get it
when that happens.
2023-01-10 17:14:27 -05:00
Loris Cro
0cba60afed
Merge pull request #14260 from EspeuteClement/master
autodoc: allow function descriptions expansion
2023-01-10 19:40:57 +01:00
Clement Espeute
b63a771e18 autodoc: allow function descriptions expansion 2023-01-10 18:55:49 +01:00
Felix "xq" Queißner
f7ade7e63b Fixes bug in AVR codegen for llvm backend 2023-01-10 16:08:05 +02:00
Techatrix
1f8f79cd53
std: add helper functions to std.zig.Ast for extracting data out of nodes 2023-01-09 16:59:19 +02:00
kcbanner
58e558822a windows: unexpectedStatus/unexpectedError start the stack trace at the caller 2023-01-08 23:51:55 -05:00
kcbanner
5e3cadf871 debug: fixup memory management 2023-01-08 22:16:16 -05:00
kcbanner
461fb499f3 windows: rework DebugInfo to use less file operations and fix some memory management issues 2023-01-08 20:28:42 -05:00
Andrew Kelley
fcee1bf993
Merge pull request #14241 from ziglang/zig-build-config-header-step
add std.build.ConfigHeaderStep
2023-01-08 14:10:55 -05:00
Loris Cro
18f6ef613c autodoc: improve linking of decl references
there are still some bugs to solve when a decl is re-exported but
straight-forward cases are handled correctly
2023-01-08 16:25:14 +01:00
Andrew Kelley
c53a556a61 std.build.WriteFileStep: fix regression in this branch
This branch makes WriteFileStep use the same hashing algorithm as our
cache system, reducing the divergence between zig build and the cache
system.
2023-01-07 19:07:33 -07:00
Andrew Kelley
01e34c1cd9 std.build.ConfigHeaderStep: stub out cmake style 2023-01-07 18:12:20 -07:00
Andrew Kelley
ea792011d1 add std.build.ConfigHeaderStep
This API converts a config.h.in file into config.h. This is useful when
introducing a build.zig file to an existing C/C++ project that is
configured with autotools or cmake.

The cmake syntax is not implemented yet.
2023-01-07 18:07:10 -07:00
Andrew Kelley
e579c88f4c std.crypto.siphash: add finalResult() and peek()
Useful for avoiding mutable state when using this API.
2023-01-07 18:06:55 -07:00
Andrew Kelley
87b223428a
Merge pull request #14207 from MasterQ32/zig-uri-upstream
Ports zig-uri to stdlib.
2023-01-07 01:52:36 -05:00
Andrew Kelley
aa87789c29 std.Uri: make scheme non-optional 2023-01-06 18:52:39 -07:00
Andrew Kelley
646a911c19 std.http.Client: update from old std.Url to new std.Uri 2023-01-06 18:05:37 -07:00
Felix "xq" Queißner
e7c109329d Renames Url.zig to Uri.zig 2023-01-06 17:56:05 -07:00
Felix "xq" Queißner
08496aa2aa Ports zig-uri to stdlib. 2023-01-06 17:56:05 -07:00
Andrew Kelley
3806091a10 std.http.Client: fix handling of \r\n before next chunk size 2023-01-06 17:53:06 -07:00
Michael Dusan
0507ced8cd stage3 bsd: support dynamic libstdc++/libc++
Currently llvm-linkage mode (static vs dynamic) decides linkage mode
for system libstdc++/libc++ .

A previous commit only tested static mode for *BSD and netbsd was
reported to not work in dynamic mode.

We now special-case freebsd, openbsd, netbsd and dragonfly for dynamic
linking too.
2023-01-06 18:04:52 -05:00
Brendan Burns
24b4e643f4
Implement some more environment functions for WASI. 2023-01-06 18:40:16 +02:00
Andrew Kelley
7a2d7ff628
Merge pull request #14224 from ziglang/std.http
std.http.Client: support transfer-encoding: chunked
2023-01-06 05:29:14 -05:00
Michael Dusan
db7b36f3fc zig.h: do not assume __GNUC__ is not clang (#2)
I missed this edit in 176940b5045ff0c9b20f9951dca34b2a1bb7edc0 .
2023-01-06 01:32:13 -05:00
Andrew Kelley
a01d2ab0e3
Merge pull request #14210 from Vexu/compile-errors
improve struct/union field error locations
2023-01-05 20:05:14 -07:00
Andrew Kelley
a7a933d7ee std.http.Client: support transfer-encoding: chunked
closes #14204

In order to add tests for this I need to implement an HTTP server in the
standard library (#910) so that's probably the next thing I'll do.
2023-01-05 19:57:00 -07:00
Andrew Kelley
d711f459ae std.crypto.tls.Client: fix crash in read()
An abstraction for giving bytes to the read buffer didn't check for an
out-of-space condition.
2023-01-05 19:57:00 -07:00
Andrew Kelley
b3e495a38a
Merge pull request #14202 from ziglang/std.http
std.http.Client: support HTTP redirects
2023-01-05 19:42:59 -07:00
Frank Denis
6ad92108e2 ELF linker: support common-page-size and max-page-size lld opts
These linker flags are required to build static ELF binaries that
can run under the Blink emulator:

https://github.com/jart/blink/issues/14
2023-01-05 19:39:17 -07:00
Andrew Kelley
c28c38d1e5
Merge pull request #13514 from kcbanner/windows_build_fixes
Windows: Support building stage3, and bootstrapping via MSVC
2023-01-05 17:26:32 -07:00
Jan Philipp Hafer
301a89849b tools: build all tools in ci to prevent bitrot
No LLVM assertions were triggered for me.
Closes #12015
Closes #12022
Closes #12223
2023-01-06 01:18:46 +02:00
Michael Dusan
176940b504 zig.h: do not assume __GNUC__ is not clang
A followup to 5bd69c655d9e04102c8a64ced1215c9d69f4f03f .

For compatibility purposes clang defines __GNUC__. This broke logic
where clang14 __has_builtin returns false but `|| defined(__GNUC__)`
made it true.

CI did not catch this because it uses clang15. However, bootstrapping
with latest apple compiler is clang14. We also want to support older
clang.
2023-01-05 15:25:35 -07:00
Andrew Kelley
3055ab7f86 std.http.Client: fail header parsing under more conditions
* when HTTP header continuations are used
 * when content-type or location header occurs more than once
2023-01-05 13:39:17 -07:00
Andrew Kelley
450f3bc925 std.http.Class: classify out-of-range codes as server_error
RFC 9110 section 15:
Values outside the range 100..599 are invalid. Implementations often use
three-digit integer values outside of that range (i.e., 600..999) for
internal communication of non-HTTP status (e.g., library errors). A
client that receives a response with an invalid status code SHOULD
process the response as if it had a 5xx (Server Error) status code.
2023-01-05 13:31:26 -07:00
Veikka Tuominen
f2faa303a5 Sema: handle enum expressions referencing local variables
Closes #12272
2023-01-05 22:03:32 +02:00