I started with this:
extension Book {
static func all(byAuthorWithId authorId: Int64) -> QueryInterfaceRequest<Book> {
return Book.filter(Book.authorId == authorId && Book.isPublished)
}
}
tmp=`mktemp -d -t swiftpm` | |
git clone --quiet https://github.com/apple/swift-package-manager $tmp > /dev/null | |
swift package --package-path $tmp resolve > /dev/null | |
time swift test --package-path $tmp --parallel | |
system_profiler SPHardwareDataType | |
swift --version |
// To reproduce crash: | |
// 1. Navigate to second tab | |
// 2. Toggle the switch | |
// 3. Navigate to first tab | |
// Note: removing the NavigationView in the second tab avoids the crash | |
final class ViewModel: BindableObject { | |
var tab: Int = 0 { willSet { willChange.send(()) } } | |
var isOn: Bool = false { willSet { willChange.send(()) } } | |
let willChange = PassthroughSubject<Void, Never>() |
import RxSwift | |
import RxCocoa | |
final class Value<T>: ObservableType { | |
private let subject: BehaviorSubject<T> | |
var value: T { | |
get { | |
return try! subject.value() | |
} |
I started with this:
extension Book {
static func all(byAuthorWithId authorId: Int64) -> QueryInterfaceRequest<Book> {
return Book.filter(Book.authorId == authorId && Book.isPublished)
}
}
Given a protocol that refines CodingKey
:
protocol DocumentedCodingKey: CodingKey {
var documentation: String { get }
}
I'd like to be able to conform the automatically generated CodingKeys
to it:
// Generated using Sourcery 0.10.0 — https://github.com/krzysztofzablocki/Sourcery | |
// DO NOT EDIT | |
import GRDBCipher | |
extension BookViewModel: RowConvertible { | |
init(row: Row) { | |
title = row["title"] | |
genre = row["genre"] | |
authorName = row["authorName"] |
This proposal improves local functions by giving them the same memory safety and expressive power as closures in regards to capturing semantics.
Hi Rick,
Thanks for taking the time to reply. I discussed the same argument with Ankit Aggarwal, and here are my counter-arguments:
install
: I’ve updated the survey bellow by ordering them by stars on GitHub. It’s a crude approximation of developer population, but I think it’s good enough for us.install
to mean install to the system, how would we update the system packages?
—system/—global
flag on update.
In that case, that would bring inconsistency by using two different commands to “install/resolve” and one command but different flags for updating.let package = Package( | |
name: "Copenssl", | |
pkgConfig: "openssl", | |
providers: [ | |
.brew("openssl"), | |
.apt("openssl", "libssl-dev") | |
] | |
) |
Two modifications here:
starting
suffix as it only really pertains to the first argument.on
to reduce the ambiguity from using two label with the same name (to
).- public func queryActivityStarting(from start: Date, to end: Date, to queue: OperationQueue, withHandler handler: CoreMotion.CMMotionActivityQueryHandler)