From f3065ebdb2a052dcdf5e1ea1eca7d1d1006bbbcf Mon Sep 17 00:00:00 2001 From: Dan Federman Date: Wed, 8 Jan 2025 10:47:21 -0800 Subject: [PATCH 1/3] Use lychee for Markdown link checker --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e727f14a..4051aac7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,11 +176,9 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 - - name: Validate Markdown - uses: umbrelladocs/action-linkspector@v1 - with: - reporter: github-check - fail_on_error: true + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v2 lint-swift: name: Lint Swift From 2c47caba687f41a3d48d7a788f3b2075d000fe76 Mon Sep 17 00:00:00 2001 From: Dan Federman Date: Wed, 8 Jan 2025 10:49:18 -0800 Subject: [PATCH 2/3] Fix Manual.md links --- Documentation/Manual.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/Manual.md b/Documentation/Manual.md index fd5df46d..65a15748 100644 --- a/Documentation/Manual.md +++ b/Documentation/Manual.md @@ -17,7 +17,7 @@ Let’s walk through each of these macros in detail. ### @Instantiable -Type declarations decorated with [`@Instantiable`](../Sources/SafeDI/PropertyDecoration/Instantiable.swift) are able to be instantiated by SafeDI. Types decorated with this macro can instantiate other `@Instantiable` dependencies, forward dependencies injected from outside of SafeDI, or receive dependencies instantiated or forwarded by objects further up the dependency tree. +Type declarations decorated with [`@Instantiable`](../Sources/SafeDI/Decorators/Instantiable.swift) are able to be instantiated by SafeDI. Types decorated with this macro can instantiate other `@Instantiable` dependencies, forward dependencies injected from outside of SafeDI, or receive dependencies instantiated or forwarded by objects further up the dependency tree. SafeDI is designed to make instantiating and receiving dependencies _simple_, without requiring developers to think about abstract dependency injection (DI) concepts. That said, for those familiar with other DI systems: each `@Instantiable` type is its own [Scope](https://medium.com/@aarontharris/scope-dependency-injection-6fc25beffc9c). For those unfamiliar with DI terminology, know that each `@Instantiable` type retains its dependencies, and that every `@Instantiated` or `@Forwarded` dependency is available to all transitive child dependencies. @@ -169,13 +169,13 @@ extension Container { ### @Instantiated -Property declarations within `@Instantiable` types decorated with [`@Instantiated`](../Sources/SafeDI/PropertyDecoration/Instantiated.swift) are instantiated when its enclosing type is instantiated. `@Instantiated`-decorated properties are available to be `@Received` by objects instantiated further down the dependency tree. +Property declarations within `@Instantiable` types decorated with [`@Instantiated`](../Sources/SafeDI/Decorators/Instantiated.swift) are instantiated when its enclosing type is instantiated. `@Instantiated`-decorated properties are available to be `@Received` by objects instantiated further down the dependency tree. `@Instantiated`-decorated properties must be an `@Instantiable` type, or of an `additionalType` listed in an `@Instantiable(fulfillingAdditionalTypes:)`’s declaration. ### @Forwarded -Property declarations within `@Instantiable` types decorated with [`@Forwarded`](../Sources/SafeDI/PropertyDecoration/Forwarded.swift) represent dependencies that come from the runtime, e.g. user input or backend-delivered content. Like an `@Instantiated`-decorated property, a `@Forwarded`-decorated property is available to be `@Received` by objects instantiated further down the dependency tree. +Property declarations within `@Instantiable` types decorated with [`@Forwarded`](../Sources/SafeDI/Decorators/Forwarded.swift) represent dependencies that come from the runtime, e.g. user input or backend-delivered content. Like an `@Instantiated`-decorated property, a `@Forwarded`-decorated property is available to be `@Received` by objects instantiated further down the dependency tree. A `@Forwarded` property is forwarded into the SafeDI dependency tree by a [`Instantiator`](#instantiator)’s `instantiate(_ forwardedProperties: T.ForwardedProperties) -> T` function that creates an instance of the property’s enclosing type. @@ -183,7 +183,7 @@ Forwarded property types do not need to be decorated with the `@Instantiable` ma ### @Received -Property declarations within `@Instantiable` types decorated with [`@Received`](../Sources/SafeDI/PropertyDecoration/Received.swift) are injected into the enclosing type’s initializer. Received properties must be `@Instantiated` or `@Forwarded` by an object higher up in the dependency tree. +Property declarations within `@Instantiable` types decorated with [`@Received`](../Sources/SafeDI/Decorators/Received.swift) are injected into the enclosing type’s initializer. Received properties must be `@Instantiated` or `@Forwarded` by an object higher up in the dependency tree. Here we have a `LoggedInContentView` in which the forwarded `user` property is received by an `UpdateUserService` further down the dependency tree. From 47f9f159f39997927a326ad180c66acb764920f6 Mon Sep 17 00:00:00 2001 From: Dan Federman Date: Wed, 8 Jan 2025 10:56:25 -0800 Subject: [PATCH 3/3] Try AlexanderDokuchaev/md-dead-link-check --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4051aac7..99478fe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,8 +177,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 - name: Link Checker - id: lychee - uses: lycheeverse/lychee-action@v2 + uses: AlexanderDokuchaev/md-dead-link-check@v1.0.1 lint-swift: name: Lint Swift