feat: Add customization for local packages structure#260
feat: Add customization for local packages structure#260Zentaur0 wants to merge 5 commits intotuist:mainfrom
Conversation
This commit adds the possibility to change standard packages structure in generated project
|
👋 Hi @pepicrft @fortmarek, When you have a moment, could you please take a look at this PR? I'm adding support for structured folders in local packages, based on this discussion. I'd really appreciate your feedback or a merge if everything looks good 🙏 P.S. There’s a related PR #232, but the original author is no longer active and unable to continue. This new PR includes all the necessary additions and refinements to move the feature forward. |
# Conflicts: # Package.resolved
|
Let's wait for @fortmarek's review. |
|
@pepicrft @fortmarek Hi! Just a gentle ping to review this request |
| public let path: AbsolutePath | ||
| public let groupPath: String? | ||
| public let excludingPath: String? | ||
| public let keepStructure: Bool |
There was a problem hiding this comment.
I find the naming here confusing. What's being excluded? What structure is kept? How do they relate to group path? Or to the default group?
There was a problem hiding this comment.
i could suggest something like this instead
public let customGroupPath: String? = "CustomGroup" // Path/To/My/Lib -> Packages/CustomGroup/Lib
public let excludingPathPrefix: String? = "Path/To" // Path/To/My/Lib -> Packages/My/Lib
public let keepOriginalStructure: Bool = true // Path/To/My/Lib -> Project/Path/To/My/LibThere was a problem hiding this comment.
Hi @Zentaur0 thanks for clarifying what each is for. Am I right understanding that they are exclusive? For example if I use a custom group path I won't use the others and viceversa? If so, I think an enum would be more appropriate here:
public struct LocalPackageReferenceConfig: Equatable, Codable, Sendable {
public enum Grouping {
case custom(String)
case trimmingPrefix(String)
case original
}
public let grouping: Grouping
}| public let path: AbsolutePath | ||
| public let groupPath: String? | ||
| public let excludingPath: String? | ||
| public let keepStructure: Bool |
There was a problem hiding this comment.
Hi @Zentaur0 thanks for clarifying what each is for. Am I right understanding that they are exclusive? For example if I use a custom group path I won't use the others and viceversa? If so, I think an enum would be more appropriate here:
public struct LocalPackageReferenceConfig: Equatable, Codable, Sendable {
public enum Grouping {
case custom(String)
case trimmingPrefix(String)
case original
}
public let grouping: Grouping
}
This commit adds the possibility to change standard packages structure in generated project