Add deprecation annotation to the context classes
This commit is contained in:
parent
5bef671990
commit
ee400ee73e
|
@ -2,6 +2,7 @@ import Foundation
|
|||
import xpmcore
|
||||
|
||||
/// Generator context protocol.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
||||
protocol GeneratorContexting: Contexting {
|
||||
/// Graph that is beging generated.
|
||||
var graph: Graphing { get }
|
||||
|
|
|
@ -3,6 +3,7 @@ import Foundation
|
|||
import xpmcore
|
||||
|
||||
/// Protocol that defines the interface of the context that is used during the graph loading.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
||||
protocol GraphLoaderContexting: Contexting {
|
||||
/// Manifest loader that is used to get a JSON representation of the manifests.
|
||||
var manifestLoader: GraphManifestLoading { get }
|
||||
|
|
|
@ -2,6 +2,7 @@ import Foundation
|
|||
import xpmcore
|
||||
|
||||
/// Context protocol.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
||||
protocol Contexting: AnyObject {
|
||||
/// Shell.
|
||||
var shell: Shelling { get }
|
||||
|
@ -18,6 +19,7 @@ protocol Contexting: AnyObject {
|
|||
|
||||
/// xpm uses contexts as a dependency injection mechanism.
|
||||
/// Contexts are initialized by the commands and passed to the different components that will use the dependencies defined in them.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
||||
class Context: Contexting {
|
||||
/// Util to handle files.
|
||||
let fileHandler: FileHandling
|
||||
|
|
Loading…
Reference in New Issue