-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify streaming BEP binary protobuf for Xcode progress bar (#17)
* Simplify streaming BEP binary protobuf for Xcode progress bar Move BEP event reading to allocating an InputStream per read, via NSFileHandle.readabilityHandler. Bazel works by appending content to a file, specifically, Java'sBufferedOutputStream. Naievely using an input stream for the path and waiting for available data will simply does not work with whatever BufferedOutputStream.flush() is doing internally. Reference: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java Perhaps, SwiftProtobuf can come up with a better solution to read from files or upstream similar code apple/swift-protobuf#130 Logic: - If there's already a file at the path remove it - Create a few file - When the build starts, Bazel will attempt to reuse the inode, and stream to it. Then, - Via NSFileHandle, wait for data to be available and read all the bytes
- Loading branch information
1 parent
a97f644
commit 6fa081b
Showing
2 changed files
with
44 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters