Each module in our setup is organized as a Workspace that contains two Tuist projects:
ModuleName-Tuist: This project contains the main source code of the module along with its unit tests. It’s the “real” module codebase.
ModuleName-Demo>: This project contains a small demo app that runs the module in isolation. You can use it to develop and test the module without launching the full application.
Dependencies
Each module can depend on both first-party (internal) and third-party (external) code:
Third-party dependencies are grouped under a Dependencies group in Xcode, making them easy to find.
Local Swift Package Manager (SPM) packages (added with .package(path: …)) are treated differently: they appear in Xcode as regular projects instead of being grouped, like Dependencies.
Ideally, we’d like to remove the local SPM package from the section where the other Tuist-generated projects live, so the workspace stays clean and easier for developers to navigate.
Is there a reason why you can’t put those packages in an extra directory, so you get the structure you wish to get?
There is, unfortunately.
We currently use those packages as a local dependency within the repository (for the Demo app purposes I mentioned above), but they are also exposed publicly for other internal repositories (other internal modules) to consume, so we need the Package.swift file to be at the roof of the repository so it can be visible to other repos consuming it through SPM.
Based on what you said though, the current behavior seems reasonable to me, so we can close this one and I can fix it on our end.