5771 Commits

Author SHA1 Message Date
Vallahor
2a3fb341aa fix: handling more types of sentinels. now can be structs too 2022-07-19 19:10:11 -07:00
Loris Cro
d707cd6e6d autodoc: improve decl categorization and fix enumliteral arrays/ptrs 2022-07-19 19:10:11 -07:00
Vallahor
21fd4a7a8b fix: printing const in types and fn decl and sentinel in strings 2022-07-19 19:10:11 -07:00
Vallahor
019fd45617 fix: sentinel working with types and in fn decls 2022-07-19 19:10:11 -07:00
Vallahor
646079c968 add: rendering sentinel in js and some fixes in autodoc 2022-07-19 19:10:11 -07:00
Loris Cro
aa545dbd1e autodoc: improve frontend rendering 2022-07-19 19:10:11 -07:00
Loris Cro
cf685c1132 autodoc: collect type information for some expressions 2022-07-19 19:10:11 -07:00
Loris Cro
ae4b5c29b2 autodoc: fix final js type error 2022-07-19 19:10:11 -07:00
Loris Cro
cc71003cfc autodoc: improved rendering container fields and fixed rendering of func
args
2022-07-19 19:10:11 -07:00
Loris Cro
d85259989e autodoc: var 2 let in main.js 2022-07-19 19:10:11 -07:00
Loris Cro
67da1b8c88 autodoc: fixed all type errors in main.js 2022-07-19 19:10:11 -07:00
Loris Cro
80f9490e06 autodoc: more js type fixes 2022-07-19 19:10:11 -07:00
Loris Cro
919b8e400c autodoc: more typechecking in main.js 2022-07-19 19:10:11 -07:00
Loris Cro
72e5b4fb74 autodoc: improve type checking in main.js 2022-07-19 19:10:11 -07:00
Loris Cro
64feb222b5 autodoc: make links respect internal docs mode 2022-07-19 19:10:11 -07:00
Loris Cro
53fa75c852 autodoc: improved frontend rendering 2022-07-19 19:10:11 -07:00
Loris Cro
36c4b1aac9 autodoc: improve rendering and add "show priv decls" checkbox 2022-07-19 19:10:11 -07:00
Reece Van Atta
5f0ab34cc5 autodoc: add type comments to main.js file 2022-07-19 19:10:11 -07:00
ABuffSeagull
e39d1ae78f autodoc: fix missing variable declaration for strict mode 2022-07-19 19:10:11 -07:00
Loris Cro
63be9e65ed autodoc: added support for error sets and extended functions 2022-07-19 19:10:11 -07:00
Loris Cro
ec7f4d1faa autodoc: add support for anytype and improve semantics for array length 2022-07-19 19:10:11 -07:00
Loris Cro
056ba8e57c autodoc: add support for @This and improve call support in decl paths 2022-07-19 19:10:11 -07:00
Loris Cro
3eb90a110f autodoc: add support for pointers and comptime expressions in decl paths 2022-07-19 19:10:11 -07:00
Loris Cro
1e2cd421b9 autodoc: add support for array decls 2022-07-19 19:10:11 -07:00
Loris Cro
8bb529b395 autodoc: add support for generic functions & generic function calls 2022-07-19 19:10:11 -07:00
Loris Cro
195231b212 autodoc: add support for non-generic function calls 2022-07-19 19:10:11 -07:00
Loris Cro
580e633777 autodoc: added support for non-lazy decl paths 2022-07-19 19:10:11 -07:00
Loris Cro
253e7e112e autodoc: add frontend support for optionals & generic cleanup 2022-07-19 19:10:11 -07:00
Loris Cro
5d4c88c741 autodoc: added basic support for unresolved comptime expressions 2022-07-19 19:10:11 -07:00
Loris Cro
ee16eddecf autodoc: added basic support for @import 2022-07-19 19:10:11 -07:00
Loris Cro
4a868fa2be autodoc: escape html in decl ref names 2022-07-19 19:10:11 -07:00
Loris Cro
564d6c4960 autodocs: improve function rendering 2022-07-19 19:10:10 -07:00
Loris Cro
b296f5ac02 autodocs: added basic support for functions 2022-07-19 19:10:10 -07:00
Loris Cro
ef5a2e8d6f autodocs: added basic support for unions 2022-07-19 19:10:10 -07:00
Loris Cro
a04045c709 autodocs: fix rendering of non-type decls 2022-07-19 19:10:10 -07:00
Loris Cro
ce40f34cbc autodocs: added support for some non-type values 2022-07-19 19:10:10 -07:00
Loris Cro
29771440b2 autodocs: add support for int values 2022-07-19 19:10:10 -07:00
Loris Cro
0135d22716 autodocs: add support for indirect decl references 2022-07-19 19:10:10 -07:00
Loris Cro
38281c8ed4 autodoc: add declval support to docs js 2022-07-19 19:10:10 -07:00
Andrew Kelley
046df9b7d0
Merge pull request #12131 from hnakamur/fix_big_int_Managed_mul_sqr_capacity_too_large
Fix std.math.big.int.Managed capacity after mul and sqr
2022-07-19 18:54:30 -04:00
LeRoyce Pearson
c26d9f6287 Read dynstr starting at rpath offset
Since we know the offset, we may as well read starting there. Still expects
rpath to fit in 4096 bytes; that might be worth fixing in the future.

Fixes issue #12112
2022-07-19 14:01:35 -04:00
Veikka Tuominen
0e26c61499 std.fs: remove accidental comptime block 2022-07-17 11:54:13 +03:00
Veikka Tuominen
fcaeca5b0a std.fs: add Iterable versions of openDirAbsolute*
Follow up to 262f4c7b3a850594a75ec154db2ba8d5f9f517ab
2022-07-17 11:52:30 +03:00
Vincent Rischmann
47c58cba59
Fix io_uring tests (#12134)
* io_uring: fix the timeout_remove test

The test does a IORING_OP_TIMEOUT followed with a IORING_OP_TIMEOUT_REMOVE
and assumed we would get the CQEs in the same order.

Linux v5.18 changed how this works and we now get them in the reverse order.

The documentation doesn't explicitly say which CQE we should get first
so just make the test work with both cases.

* io_uring: fix the remove_buffers test

The original test was buggy but accidentally worked with kernels < 5.18

The test assumed that IORING_OP_REMOVE_BUFFERS removed from the start of
but in fact the documentation doesn't specify which buffer is removed,
only that a certain number of buffers are removed.

Starting with the kernel 5.18 the check for the `used_buffer_id` fails.
Turns out that previous kernels removed buffers in such a way that the
remaining buffer for this read would always be 0, however this isn't
true anymore.

Instead of checking a specific value just check that the `used_buffer_id`
corresponds to a valid ID.
2022-07-16 10:05:11 -05:00
alichraghi
9c66fdadc7 std.testing: add refAllDeclsRecursive function 2022-07-16 12:33:25 +03:00
Ryan Liptak
43770c0103 Fix checkAllAllocationFailures being too strict when checking arg types
Before this would fail to compile:

```
fn testFn(alloc: std.mem.Allocator, arr: []const u8) !void {
    _ = alloc;
    _ = arr;
}

test "checkAll" {
    var arr = [_]u8{ 1, 2, 3 };
    try std.testing.checkAllAllocationFailures(std.testing.allocator, testFn, .{arr[0..]});
}
```

with the error `error: Unexpected type for extra argument at index 0: expected []const u8, found *[3]u8`

By removing this strict equality check, we allow the type checking to be done during the `@field(args, arg_i_str) = @field(extra_args, field.name);` instead, which then allows for things like type coercion to work, but still will give a compile error if the types are incorrect. So, after this change, the above succeeds (because `*[3]u8` can be coerced to `[]const u8`).

The new compile error when providing an incorrect type that can't be coerced looks like this:

```
zig/lib/std/testing.zig:639:35: error: expected type '[]const u8', found '*[3]u32'
        @field(args, arg_i_str) = @field(extra_args, field.name);
                                  ^
```
2022-07-16 12:32:20 +03:00
Hiroaki Nakamura
3e667fd292 Use Managed.len in sub, divFloor, and divTrunc too 2022-07-16 11:46:13 +09:00
Hiroaki Nakamura
0cee8372cf Use Managed.len() instead of Managed.toConst().limbs.len 2022-07-16 08:14:16 +09:00
Hiroaki Nakamura
d63604b116 Fix std.math.big.int.Managed capacity after mul and sqr 2022-07-16 00:08:55 +09:00
Veikka Tuominen
262f4c7b3a std.fs: remove OpenDirOptions.iterate 2022-07-15 14:39:21 +03:00