-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Chimera - fetch carthage
dependencies.
#2060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @laxmorek. Despite all my comments, I think the work is going in the right direction and the work is very aligned with how we do things in the project. Congratulations fur such a great contribution 👏
Sources/TuistDependencies/DependenciesManagerInteractors/Builders/CartfileContentBuilder.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/DependenciesManagerInteractors/Builders/CartfileContentBuilder.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/DependenciesManagerInteractors/Builders/CartfileContentBuilder.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/DependenciesManagerInteractors/Builders/CartfileContentBuilder.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/DependenciesManagerInteractors/Builders/CarthageCommandBuilder.swift
Outdated
Show resolved
Hide resolved
...stDependencies/DependenciesManagerInteractors/Interactors/CarthageFrameworksInteractor.swift
Outdated
Show resolved
Hide resolved
...stDependencies/DependenciesManagerInteractors/Interactors/CarthageFrameworksInteractor.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/DependenciesManagerInteractors/CarthageInteractor.swift
Outdated
Show resolved
Hide resolved
...stDependencies/DependenciesManagerInteractors/Interactors/CarthageFrameworksInteractor.swift
Outdated
Show resolved
Hide resolved
c7c270d
to
f80df3c
Compare
@pepibumur Thank you for your review. I adjusted PR to your suggestion. Could you revisit it? |
Reminder about the Carthage
|
Sources/TuistDependencies/Carthage/Generators/CartfileContentGenerator.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/Carthage/Interactors/CarthageFrameworksInteractor.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/Carthage/Interactors/CarthageFrameworksInteractor.swift
Outdated
Show resolved
Hide resolved
Sources/TuistDependencies/Carthage/Interactors/CarthageFrameworksInteractor.swift
Outdated
Show resolved
Hide resolved
Sources/TuistSupport/Constants.swift
Outdated
public struct DependenciesDirectory { | ||
public static let name = "Dependencies" | ||
public static let graphName = "graph.json" | ||
public static let lockfilesDirectoryName = "Lockfiles" | ||
public static let cartfileResolvedName = "Cartfile.resolved" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we convert it to an enum? Since everything is static, we should avoid people going DependenciesDirectory()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that everything is a struct though 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have followed convention in this file.
Constants.Vendor
, Constants.DerivedDirectory
etc
Im agree with you but I don't want to introduce a mess here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically we should convert every struct
in this file to enum
. Should I do it in this PR? 🤔
Update 🙂Dependencies.swiftFrom now dependency's requirements depends on dependency manager. There is also no longer common Before: import ProjectDescription
let dependencies = Dependencies([
.carthage(name: "Alamofire/Alamofire", requirement: .exact("5.0.4"), platforms: [.macOS]),
.carthage(name: "Swinject/Swinject", requirement: .exact("2.7.1"), platforms: [.macOS]),
]) Now: import ProjectDescription
let dependencies = Dependencies(
carthage: [
.init(name: "Alamofire/Alamofire", requirement: .exact("5.0.4"), platforms: [.macOS]),
.init(name: "Swinject/Swinject", requirement: .exact("2.7.1"), platforms: [.macOS]),
]
) Tuist/Dependencies directoryNew structure of Tuist
|- Dependencies
|- graph.json # not part of this PR
|- Lockfiles
|- Carthage.resolved
|- Podfile.lock # not part of this PR
|- Package.resolved # not part of this PR
|- Carthage
|- Build
|- Alamofire
|- iOS
|- Alamofire.framework
|- tvOS
|- Alamofire.framework
|- Cocoapods # not part of this PR
|- RxSwift
|- SwftPackageManager # not part of this PR
|- Moya Frameworks handling
Carthage command
Others
|
467f8bb
to
52cd26b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't taken an in-depth look at the code since I lack the context here to make that useful but looking at the public API this feature is looking really nice!
Thanks for making the API more explicit and less possible to hit errors!
Sources/TuistLoader/Models+ManifestMappers/Dependencies+ManifestMapper.swift
Show resolved
Hide resolved
4af39fa
to
ca940e8
Compare
|
||
@testable import ProjectDescription | ||
|
||
final class DependencyTests: XCTestCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should inherit from TuistUnitTestCase
|
||
@testable import ProjectDescription | ||
|
||
final class DependenciesTests: XCTestCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should inherit from TuistUnitTestCase
@testable import TuistCore | ||
@testable import TuistSupportTesting | ||
|
||
final class CarthageDependencyTests: TuistTestCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a unit test, it should inherit from TuistUnitTestCase
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant work @laxmorek. I think we are ready to merge here after addressing the final comments.
carthage
support.carthage
- update support.
carthage
- update support.carthage
dependencies.
Short description 📝
Working on #1674
Adds possibility to install
carthage
dependencies defined inTuist/Dependencies.swift
usingtuist dependencies fetch
andtuist dependencies update
commands.Comments 🗒
.gitignore
ofapp_with_framework_and_tests_and_dependencies
I addedTuist/Dependencies/*
. I don't want to track generated files.Frameworks are rebuilding with every run ofI have done ittuist dependencies *
. Im going to fix it in the next PR.Implementation 👩💻👨💻
tuist dependencies fetch/update
forcarthage
app_with_framework_and_tests_and_dependencies