forked from swiftlang/swift-format
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render GraphViz graphs using library instead of spawning processes (s…
…wiftlang#240) * Render GraphViz graphs using library instead of spawning processes Update GraphViz dependency * Add Brewfile Use brew bundle in CI
- Loading branch information
Showing
10 changed files
with
119 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brew 'graphviz' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"entries": { | ||
"brew": { | ||
"graphviz": { | ||
"version": "2.47.0", | ||
"bottle": { | ||
"rebuild": 0, | ||
"cellar": "/usr/local/Cellar", | ||
"prefix": "/usr/local", | ||
"root_url": "https://homebrew.bintray.com/bottles", | ||
"files": { | ||
"arm64_big_sur": { | ||
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.arm64_big_sur.bottle.tar.gz", | ||
"sha256": "e4263e38be3d51648bffba45b0572dafd16254ce27fc3d1b13c555dff1110d5a" | ||
}, | ||
"big_sur": { | ||
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.big_sur.bottle.tar.gz", | ||
"sha256": "7972126b79753efa1f0c3519d6a063079cb1ff02c69759864a865e4ae6b4f193" | ||
}, | ||
"catalina": { | ||
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.catalina.bottle.tar.gz", | ||
"sha256": "e5d3b7b652e5cf828c0a2afc2fadb31090f3d7f10389766857404b4359b695e3" | ||
}, | ||
"mojave": { | ||
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.mojave.bottle.tar.gz", | ||
"sha256": "d045a9a68315b4e3fa61c7a0a813da345be8197892d070162d909f4985ff3bd7" | ||
} | ||
} | ||
} | ||
}, | ||
"sqlite": { | ||
"version": "3.35.3", | ||
"bottle": { | ||
"rebuild": 0, | ||
"cellar": ":any", | ||
"prefix": "/usr/local", | ||
"root_url": "https://homebrew.bintray.com/bottles", | ||
"files": { | ||
"arm64_big_sur": { | ||
"url": "https://homebrew.bintray.com/bottles/sqlite-3.35.3.arm64_big_sur.bottle.tar.gz", | ||
"sha256": "dc73e344c364d891047ab1b4fa54c25196b5fb61ac646d3ac3c731311d81e9a4" | ||
}, | ||
"big_sur": { | ||
"url": "https://homebrew.bintray.com/bottles/sqlite-3.35.3.big_sur.bottle.tar.gz", | ||
"sha256": "6f491b7ef85515ede5f193db760117c39f4d4f2dadb482c2f48410b2ea00d1eb" | ||
}, | ||
"catalina": { | ||
"url": "https://homebrew.bintray.com/bottles/sqlite-3.35.3.catalina.bottle.tar.gz", | ||
"sha256": "615597e87a1804124b019e35609539878eaf17e52f58ef03ce2ed1cd9536b299" | ||
}, | ||
"mojave": { | ||
"url": "https://homebrew.bintray.com/bottles/sqlite-3.35.3.mojave.bottle.tar.gz", | ||
"sha256": "996aa3f07c2a41ef497bed0c00fbff1272d89e3a282ac8661e7ad5533f09d533" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"system": { | ||
"macos": { | ||
"catalina": { | ||
"HOMEBREW_VERSION": "3.0.10-23-g5e0b08d", | ||
"HOMEBREW_PREFIX": "/usr/local", | ||
"Homebrew/homebrew-core": "98313dbb946cca3ddc973624b80f39fd1b481c81", | ||
"CLT": "12.4.0.0.1.1610135815", | ||
"Xcode": "12.4", | ||
"macOS": "10.15.7" | ||
} | ||
} | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import Foundation | ||
|
||
func _await<T>(_ body: (@escaping (Result<T, Error>) -> Void) -> Void) throws -> T { | ||
return try _await(body).get() | ||
} | ||
|
||
func _await<T>(_ body: (@escaping (T) -> Void) -> Void) -> T { | ||
let condition = NSCondition() | ||
var value: T? | ||
|
||
body { output in | ||
condition.lock { | ||
value = output | ||
condition.signal() | ||
} | ||
} | ||
|
||
condition.lock { | ||
while value == nil { | ||
condition.wait() | ||
} | ||
} | ||
|
||
return value! | ||
} | ||
|
||
fileprivate extension NSCondition { | ||
func lock<T>(_ body: () throws -> T) rethrows -> T { | ||
lock() | ||
defer { unlock() } | ||
|
||
return try body() | ||
} | ||
} |
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