Skip to content

introduce std.event.fs for async file system functions #1294

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 26 commits into from
Aug 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cc45527
introduce std.event.fs for async file system functions
andrewrk Jul 26, 2018
a870228
self-hosted: use std.event.fs.readFile
andrewrk Jul 26, 2018
3c8d4e0
std: file system watching for linux
andrewrk Jul 30, 2018
e3ae2cf
add std.event.RwLock and a few more std changes
andrewrk Aug 1, 2018
821805a
WIP: Channel.getOrNull
andrewrk Aug 2, 2018
951124e
evented I/O zig fmt
andrewrk Aug 2, 2018
65140b2
Merge remote-tracking branch 'origin/master' into async-fs
andrewrk Aug 2, 2018
7f6e97c
fixups from the merge
andrewrk Aug 2, 2018
5dfcd09
self-hosted: watch files and trigger a rebuild
andrewrk Aug 3, 2018
c5f1925
when decls don't change, don't regenerate them
andrewrk Aug 3, 2018
2680f9a
Merge remote-tracking branch 'origin/master' into async-fs
andrewrk Aug 3, 2018
97be8de
std.HashMap.autoHash: use xor instead of wrapping mult
andrewrk Aug 6, 2018
2c9ed66
merge @kristate's std lib changes to darwin
andrewrk Aug 6, 2018
fd50a68
std.event.fs support for macos
andrewrk Aug 7, 2018
1a28f09
fix hash map test
andrewrk Aug 7, 2018
5cbfe39
implement std.event.fs.Watch for macos
andrewrk Aug 8, 2018
60955fe
std.event.fs.Watch distinguishes between Delete and CloseWrite on darwin
andrewrk Aug 8, 2018
ac12f0d
fix linux regressions
andrewrk Aug 8, 2018
8b45692
std.event.fs.pwritev windows implementation
andrewrk Aug 8, 2018
c63ec98
std.event.fs.preadv windows implementation
andrewrk Aug 8, 2018
b219feb
initial windows implementation of std.event.fs.Watch
andrewrk Aug 9, 2018
26a842c
windows: only create io completion port once
andrewrk Aug 10, 2018
23af36c
windows fs watching: fix not initializing table value
andrewrk Aug 10, 2018
d40f3fa
docgen: fix usage of std.HashMap
andrewrk Aug 10, 2018
0df485d
self-hosted: reorganize creation and destruction of Compilation
andrewrk Aug 10, 2018
598e809
windows: call CancelIo when canceling an fs watch
andrewrk Aug 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,14 @@ set(ZIG_STD_FILES
"empty.zig"
"event.zig"
"event/channel.zig"
"event/fs.zig"
"event/future.zig"
"event/group.zig"
"event/lock.zig"
"event/locked.zig"
"event/loop.zig"
"event/rwlock.zig"
"event/rwlocked.zig"
"event/tcp.zig"
"fmt/errol/enum3.zig"
"fmt/errol/index.zig"
Expand Down Expand Up @@ -553,6 +556,7 @@ set(ZIG_STD_FILES
"math/tanh.zig"
"math/trunc.zig"
"mem.zig"
"mutex.zig"
"net.zig"
"os/child_process.zig"
"os/darwin.zig"
Expand Down
4 changes: 2 additions & 2 deletions doc/docgen.zig
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc {
.n = header_stack_size,
},
});
if (try urls.put(urlized, tag_token)) |other_tag_token| {
if (try urls.put(urlized, tag_token)) |entry| {
parseError(tokenizer, tag_token, "duplicate header url: #{}", urlized) catch {};
parseError(tokenizer, other_tag_token, "other tag here") catch {};
parseError(tokenizer, entry.value, "other tag here") catch {};
return error.ParseError;
}
if (last_action == Action.Open) {
Expand Down
4 changes: 2 additions & 2 deletions src-self-hosted/codegen.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pub async fn renderToLlvm(comp: *Compilation, fn_val: *Value.Fn, code: *ir.Code)
var output_path = try await (async comp.createRandomOutputPath(comp.target.objFileExt()) catch unreachable);
errdefer output_path.deinit();

const llvm_handle = try comp.event_loop_local.getAnyLlvmContext();
defer llvm_handle.release(comp.event_loop_local);
const llvm_handle = try comp.zig_compiler.getAnyLlvmContext();
defer llvm_handle.release(comp.zig_compiler);

const context = llvm_handle.node.data;

Expand Down
Loading