Skip to content

Instantly share code, notes, and snippets.

private var isColorOutputCapable: Bool = {
guard let term = ProcessInfo.processInfo.environment["TERM"],
term.lowercased() != "dumb",
isatty(fileno(stdout)) != 0 else {
return false
}
return true
}()
#/usr/bin/bash
set -e
orig_path=$PATH
function typecheck {
swiftc -typecheck -module-name PeripheryKit Sources/PeripheryKit/Analyzer/Analyzer.swift Sources/PeripheryKit/Analyzer/SourceGraphVisitor.swift Sources/PeripheryKit/Analyzer/Visitors/AccessibilityCascader.swift Sources/PeripheryKit/Analyzer/Visitors/AncestralReferenceEliminator.swift Sources/PeripheryKit/Analyzer/Visitors/AssetReferenceRetainer.swift Sources/PeripheryKit/Analyzer/Visitors/AssignOnlyPropertyReferenceEliminator.swift Sources/PeripheryKit/Analyzer/Visitors/AssociatedTypeTypeAliasReferenceBuilder.swift Sources/PeripheryKit/Analyzer/Visitors/CodingKeyEnumReferenceBuilder.swift Sources/PeripheryKit/Analyzer/Visitors/ComplexPropertyAccessorReferenceBuilder.swift Sources/PeripheryKit/Analyzer/Visitors/DeclarationMarker.swift Sources/PeripheryKit/Analyzer/Visitors/DefaultConstructorReferenceBuilder.swift Sources/PeripheryKit/Analyzer/Visitors/EncodablePropertyRetainer.swift Sources/PeripheryKit/Analyzer/Visitors/EntryPointAttributeRetain
export type Result<T, E> = Success<T, E> | Failure<T, E>
export const success = <T, E>(value: T): Success<T, E> => new Success(value)
export const failure = <T, E>(error: E): Failure<T, E> => new Failure(error)
export class Success<T, E> {
constructor(readonly value: T) {}
map<A>(transform: (t: T) => A): Result<A, E> {
return success(transform(this.value))
db_1 | 2020-06-13 15:47:34.307 UTC [56] LOG: execute <unnamed>: CREATE TABLE IF NOT EXISTS "_fluent_migrations"("id" UUID PRIMARY KEY, "name" TEXT NOT NULL, "batch" BIGINT NOT NULL, "created_at" TIMESTAMPTZ, "updated_at" TIMESTAMPTZ, CONSTRAINT "uq:_fluent_migrations.name" UNIQUE ("name"))
db_1 | 2020-06-13 15:47:34.314 UTC [56] LOG: execute <unnamed>: SELECT COUNT("_fluent_migrations"."id") AS "aggregate" FROM "_fluent_migrations" WHERE "_fluent_migrations"."name" IN ($1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11)
db_1 | 2020-06-13 15:47:34.314 UTC [56] DETAIL: parameters: $1 = 'CreateGenre', $2 = 'CreateMovieGenre', $3 = 'CreateMovie', $4 = 'CreateSearchItem', $5 = 'CreateUser', $6 = 'CreateEmailToken', $7 = 'CreateMovieKeyword', $8 = 'CreatePasswordResetToken', $9 = 'AddIsContactableToUser', $10 = '_Migration', $11 = 'CreateKeyword'
db_1 | 2020-06-13 15:47:34.327 UTC [57] LOG: execute <unnamed>: SELECT "_fluent_migrations"."id" AS "_fluent_migrations_id", "_fluent_migra
id | name | batch | created_at | updated_at
--------------------------------------+-----------------------------------------------------------------+-------+-------------------------------+-------------------------------
74987fb6-bbb1-414c-b912-6d6cccd113e0 | Fluent.SessionRecord.(unknown context at $100dc66fc)._Migration | 1 | 2020-06-13 10:12:33.688364+00 | 2020-06-13 10:12:33.688364+00
593a2bdf-14ae-4dc7-b440-2fdfb7f0e326 | App.CreateMovie | 1 | 2020-06-13 10:12:33.702604+00 | 2020-06-13 10:12:33.702604+00
7c196963-bd4c-4f6d-b218-2f4f78004e61 | App.CreateGenre | 1 | 2020-06-13 10:12:33.716927+00 | 2020-06-13 10:12:33.716927+00
602064e9-a5fc-4dff-ba3e-56bbd7644530 | App.CreateMovieGenre | 1 | 2020-06-13 10:12:33.727445+00 | 2020-06
[ DEBUG ] Could not load .env.development file: open(file:oFlag:mode:): No such file or directory (errno: 2) (Vapor/Application.swift:132)
[ DEBUG ] Factory created. [RedisConnectionFactory: DC0B14E3-DB44-43F6-836E-4D714D833D84] (RedisKit/RedisConnectionSource.swift:20)
[ DEBUG ] No available connections on this event loop, creating a new one [database-id: psql] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:193)
[ DEBUG ] Logging into Postgres db sb_dev as sb (PostgresNIO/Connection/PostgresConnection+Authenticate.swift:42)
[ DEBUG ] CREATE TABLE IF NOT EXISTS "_fluent_migrations"("id" UUID PRIMARY KEY, "name" TEXT NOT NULL, "batch" BIGINT NOT NULL, "created_at" TIMESTAMPTZ, "updated_at" TIMESTAMPTZ, CONSTRAINT "uq:_fluent_migrations.name" UNIQUE ("name")) [] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
[ NOTICE ] relation "_fluent_migrations" already exists, skipping (transformCreateStmt) (PostgresNIO/Connection/PostgresConnection+Database.swift:60)
[ DEBUG ] Checking for pre-r
import XCTest
public enum TestWaitResult {
case wait, success
}
public enum WaitTimeoutCondition {
case fail, skip
}
# Xcode 10.1
Declaration(protocol, 'MyProtocol', internal, [], 's:17RetentionFixtures10MyProtocolP', testBug.swift:3:10)
··Reference(typealias, 'AnyObject', 's:s9AnyObjecta', nil, testBug.swift:3:22)
··Declaration(function.method.static, 'someMethod()', internal, [], 's:17RetentionFixtures10MyProtocolP10someMethodyyFZ', testBug.swift:4:17)
Declaration(class, 'MyBase', open, [open], 's:17RetentionFixtures6MyBaseC', testBug.swift:7:12)
··Reference(protocol, 'MyProtocol', 's:17RetentionFixtures10MyProtocolP', nil, testBug.swift:7:20)
··Related(protocol, 'MyProtocol', 's:17RetentionFixtures10MyProtocolP', nil, testBug.swift:7:20)
··Declaration(function.constructor, nil, internal, [], 's:17RetentionFixtures6MyBaseCACycfc', testBug.swift:7:12)
# Xcode 10.2 beta 2
Declaration(protocol, 'MyProtocol', internal, [], 's:17RetentionFixtures10MyProtocolP', testBug.swift:3:10)
··Reference(typealias, 'AnyObject', 's:s9AnyObjecta', nil, testBug.swift:3:22)
··Declaration(function.method.static, 'someMethod()', internal, [], 's:17RetentionFixtures10MyProtocolP10someMethodyyFZ', testBug.swift:4:17)
Declaration(class, 'MyBase', open, [open], 's:17RetentionFixtures6MyBaseC', testBug.swift:7:12)
··Reference(protocol, 'MyProtocol', 's:17RetentionFixtures10MyProtocolP', nil, testBug.swift:7:20)
··Related(protocol, 'MyProtocol', 's:17RetentionFixtures10MyProtocolP', nil, testBug.swift:7:20)
··Declaration(function.constructor, nil, internal, [], 's:17RetentionFixtures6MyBaseCACycfc', testBug.swift:7:12)
# Xcode 10.2 beta 2
{
"key.entities" : [
{
"key.line" : 1,
"key.usr" : "c:@M@Foundation",
"key.column" : 8,
"key.name" : "Foundation",
"key.kind" : "source.lang.swift.ref.module"