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
import FeatureService | |
extension Feature1: Feature1Service { | |
public func doSomething() { | |
print("Feature1 do something") | |
} | |
} |
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
class AppContext { | |
let container: DIContainer | |
init() { | |
self.container = DIContainer.init() | |
ServiceAssembly.assembled(in: container) | |
} | |
} | |
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
import Foundation | |
import Swinject | |
public typealias DIContainer = Container | |
public final class AnyInitializer { | |
private let resolve:(_ container: DIContainer) -> Any | |
public init<D1, D2, T>(_ function: @escaping (D1, D2) -> T) { | |
resolve = { container in | |
let d1: D1 = container.resolve(D1.self)! |
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
func testFeature2() { | |
let dependencies: Feature2.Dependencies = AnyInitializer(Feature2.Dependencies.init).resolve(by: container) | |
let f2 = Feature2(dependencies: dependencies) | |
f2.doSomething() | |
} | |
output: | |
Test Case '-[DITests.DITests testFeature2]' started. |
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
/usr/bin/swift | |
-frontend -c /Feature3.swift | |
-primary-file PrivateModel.swift | |
-emit-module-path /PrivateModel\~partial.swiftmodule | |
-emit-module-doc-path /PrivateModel\~partial.swiftdoc |
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
### Swift dependencies file v0 ### | |
provides-top-level: | |
- "Feature2" | |
provides-nominal: | |
- "8Feature2AAC" | |
provides-member: | |
- ["8Feature2AAC", ""] | |
provides-dynamic-lookup: | |
- "doSomething" | |
- "feature1" |
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
2020-08-11 16:04:56.202 Xcode[33874:47419755] SourceKit-client: [2:request:775:690.9009] [398] { | |
key.request: source.request.indexer.notify-indexable-did-add-file, | |
key.filepath: "/Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo/Modal.swift", | |
key.indexer.arg.indexer-token: 1, | |
key.indexer.arg.indexable.id: "/Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo.xcodeproj/IndexingDemo-4ED35A0324E2816600806386" | |
} |
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
2020-08-11 15:58:33.804 Xcode[33874:47408816] SourceKit-client: [2:request:156931:308.5030] [336] { | |
key.request: source.request.indexer.srv.jump-to-expression-definition, | |
key.indexer.arg.indexer-token: 1, | |
key.indexer.arg.query.name: "hello", | |
key.indexer.arg.query.doc-location: { | |
key.indexer.arg.doc-loc.url: "file:///Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo/ViewController.swift", | |
key.indexer.arg.doc-loc.start-line: 17, | |
key.indexer.arg.doc-loc.start-col: 9, | |
key.indexer.arg.doc-loc.end-line: 17, | |
key.indexer.arg.doc-loc.end-col: 9, |
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
2020-08-11 16:09:10.248 Xcode[33874:47431447] SourceKit-client: [2:response:775:944.9466] [227] { | |
key.diagnostic_stage: source.diagnostic.stage.swift.parse, | |
key.syntaxmap: [ | |
], | |
key.substructure: [ | |
{ | |
key.kind: source.lang.swift.decl.class, | |
key.name: "Modal", | |
key.offset: 147, | |
key.length: 55, |
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
2020-08-11 16:16:00.716 Xcode[33874:47448018] SourceKit-client: [2:request:205587:1355.4146] [839] { | |
key.request: source.request.workspace.refactoring.find-rename-ranges-at-location, | |
key.indexer.arg.indexer-token: 1, | |
key.indexer.arg.query.file-content: "<DATA>", | |
key.indexer.arg.occurrence.location: { | |
key.indexer.arg.doc-loc.url: "file:///Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo/ViewController.swift", | |
key.indexer.arg.doc-loc.start-line: 19, | |
key.indexer.arg.doc-loc.start-col: 14, | |
key.indexer.arg.doc-loc.end-line: 19, | |
key.indexer.arg.doc-loc.end-col: 14, |