Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

feat: Add customization for local packages structure#260

Open
Zentaur0 wants to merge 5 commits intotuist:mainfrom
Zentaur0:feature/group-path-support
Open

feat: Add customization for local packages structure#260
Zentaur0 wants to merge 5 commits intotuist:mainfrom
Zentaur0:feature/group-path-support

Conversation

@Zentaur0
Copy link
Copy Markdown

This commit adds the possibility to change standard packages structure in generated project

This commit adds the possibility to change standard packages structure in generated project
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jul 29, 2025
@Zentaur0
Copy link
Copy Markdown
Author

👋 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.

@pepicrft pepicrft changed the title Add customization for local packages structure feat: Add customization for local packages structure Jul 31, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 31, 2025
@pepicrft pepicrft requested a review from fortmarek September 22, 2025 15:23
@pepicrft
Copy link
Copy Markdown
Contributor

Let's wait for @fortmarek's review.

@Zentaur0
Copy link
Copy Markdown
Author

Zentaur0 commented Oct 8, 2025

@pepicrft @fortmarek Hi! Just a gentle ping to review this request

Comment on lines +25 to +28
public let path: AbsolutePath
public let groupPath: String?
public let excludingPath: String?
public let keepStructure: Bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/Lib

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 
}

Copy link
Copy Markdown
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +25 to +28
public let path: AbsolutePath
public let groupPath: String?
public let excludingPath: String?
public let keepStructure: Bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 
}

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Dec 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants