Andrew Kelley
9493738e54
Merge branch 'freebsd-up' of https://github.com/myfreeweb/zig into freebsd2
2018-11-19 17:24:41 -05:00
Andrew Kelley
b8b36f3cce
disable windows test until coroutines rewrite lands
...
See #1363
2018-11-15 10:02:12 -05:00
Jimmi Holst Christensen
8139c5a516
New Zig formal grammar ( #1685 )
...
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00
Greg V
e5627f8e63
Support more of std on FreeBSD
2018-10-20 15:21:35 +03:00
Jimmi Holst Christensen
378d3e4403
Solve the return type ambiguity ( #1628 )
...
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
Andrew Kelley
d1ec8377d1
std lib: flesh out the async I/O streaming API a bit
2018-10-01 10:53:39 -04:00
Andrew Kelley
9d4eaf1e07
update std lib API for I/O
...
std.io.FileInStream -> std.os.File.InStream
std.io.FileInStream.init(file) -> file.inStream()
std.io.FileOutStream -> std.os.File.OutStream
std.io.FileOutStream.init(file) -> file.outStream()
remove a lot of error code possibilities from os functions
std.event.net.socketRead -> std.event.net.read
std.event.net.socketWrite -> std.event.net.write
add std.event.net.readv
add std.event.net.writev
add std.event.net.readvPosix
add std.event.net.writevPosix
add std.event.net.OutStream
add std.event.net.InStream
add std.event.io.InStream
add std.event.io.OutStream
2018-09-30 17:28:35 -04:00
Andrew Kelley
c06a61e9bf
remove this
. add @This()
.
...
closes #1283
2018-09-13 16:34:33 -04:00
Andrew Kelley
a757533386
fix zig fmt on windows
...
closes #1069
2018-09-12 14:26:21 -04:00
Andrew Kelley
178d69191b
windows: std.fs functions support concurrent ops
...
when reading and writing the same file descriptors
2018-09-12 13:55:35 -04:00
Andrew Kelley
6b31b178a6
fix regression from 2f7f7d815d
2018-08-24 12:59:31 -04:00
Shawn Landden
2f7f7d815d
missing PATH_MAX change
2018-08-23 17:00:50 -07:00
Andrew Kelley
ea1b21dbdb
fix linux
...
* error.BadFd is not a valid error code. it would always be a bug to
get this error code.
* merge error.Io with existing error.InputOutput
* merge error.PathNotFound with existing error.FileNotFound.
Not all OS's support both.
* add os.File.openReadC
* add error.BadPathName for windows file operations with invalid
characters
* add os.toPosixPath to help stack allocate a null terminating byte
* add some TODOs for other functions to investigate removing the
allocator requirement
* optimize some implementations to use the alternate functions when
a null byte is already available
* add a missing error.SkipZigTest
* os.selfExePath uses a non-allocating API
* os.selfExeDirPath uses a non-allocating API
* os.path.real uses a non-allocating API
* add os.path.realAlloc and os.path.realC
* convert many windows syscalls to use the W versions (See #534 )
2018-08-21 20:31:50 -04:00
Andrew Kelley
51852d2587
fix windows
2018-08-21 16:07:28 -04:00
Andrew Kelley
598e80957e
windows: call CancelIo when canceling an fs watch
2018-08-10 13:19:07 -04:00
Andrew Kelley
23af36c54f
windows fs watching: fix not initializing table value
2018-08-09 21:48:25 -04:00
Andrew Kelley
26a842c264
windows: only create io completion port once
2018-08-09 20:12:46 -04:00
Andrew Kelley
b219feb3f1
initial windows implementation of std.event.fs.Watch
2018-08-09 16:48:44 -04:00
Andrew Kelley
c63ec9886a
std.event.fs.preadv windows implementation
2018-08-08 16:55:19 -04:00
Andrew Kelley
8b456927be
std.event.fs.pwritev windows implementation
...
also fix 2 bugs where the function didn't call allocator.shrink:
* std.mem.join
* std.os.path.resolve
2018-08-08 15:06:32 -04:00
Andrew Kelley
ac12f0df71
fix linux regressions
2018-08-07 22:23:26 -04:00
Andrew Kelley
60955feab8
std.event.fs.Watch distinguishes between Delete and CloseWrite on darwin
...
TODO: after 1 event emitted for a deleted file, the file is no longer
watched
2018-08-07 22:14:30 -04:00
Andrew Kelley
5cbfe392be
implement std.event.fs.Watch for macos
2018-08-07 21:06:21 -04:00
Andrew Kelley
fd50a6896b
std.event.fs support for macos
...
The file I/O stuff is working, but the fs watching
stuff is not yet.
2018-08-07 00:49:09 -04:00
Andrew Kelley
5dfcd09e49
self-hosted: watch files and trigger a rebuild
2018-08-03 17:22:17 -04:00
Andrew Kelley
7f6e97cb26
fixups from the merge
2018-08-02 17:36:08 -04:00
Andrew Kelley
821805aa92
WIP: Channel.getOrNull
2018-08-02 17:04:17 -04:00
Andrew Kelley
e3ae2cfb52
add std.event.RwLock and a few more std changes
...
* add std.event.RwLock and std.event.RwLocked
* std.debug.warn does its printing locked
* add std.Mutex, however it's currently implemented as a spinlock
* rename std.event.Group.cancelAll to std.event.Group.deinit and change
the docs and assumptions.
* add std.HashMap.clone
2018-08-01 16:26:37 -04:00
Andrew Kelley
3c8d4e04ea
std: file system watching for linux
2018-07-30 13:46:09 -04:00
Andrew Kelley
a870228ab4
self-hosted: use std.event.fs.readFile
2018-07-30 13:44:36 -04:00
Andrew Kelley
cc45527333
introduce std.event.fs for async file system functions
...
only works on linux so far
2018-07-30 13:44:36 -04:00