Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to add target as dependency #37

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

kawoou
Copy link
Owner

@kawoou kawoou commented Aug 1, 2020

1. Support to add target as dependency.

deli.yml:

target:
- MyProject
- OtherProject

config:
  OtherProject:
    project: OtherProject

    # ...

  MyProject:
    project: MyProject
    
    # ...

    # >>>
    dependencies:
    - target: OtherProject
    # <<<

2. Add reverse propagation that find the dependency.

When an implementation is injected as a protocol from a submodule other than the module where the object is implemented, makes connections between corresponding protocols and objects possible in submodules.

Untitled Diagram

3. Support to inject payload for the Factory.

struct UserPayload: Payload { ... }
// ...
class UserViewModel: AutowiredFactory {
    // ...
    init(payload: UserPayload) { ... }
    // ...
}
// ...
class TestViewModel: Inject {
    // ...
    func makeUserViewModel(_ payload: UserPayload) -> UserViewModel {
        Inject(UserViewModel.self, with: payload)
    }
    // ...
}

4. Support protocol composition.

typealias CombineProtocol = AProtocol & BProtocol

5. Bug fixes

  • Parsing nested-type bug in the extension.
  • Multiple module load bug

6. Add SwiftLint comment in factory code that generated.

import Deli
// swiftlint:disable all
final class SurveyFactory: ModuleFactory {
override func load(context: AppContext) {

@kawoou kawoou added bug Something isn't working enhancement New feature or request labels Aug 1, 2020
@kawoou kawoou self-assigned this Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant