Description
I wanted to open the discussion around workspace generation and dependencies - opening a new task for the issue for a more concrete discussion.
To support making applications as modular as possible we would want a app/project.yml
file to be able to specify a dependency on another lib/project.yml
file. Looking at the way buck refers to dependencies in the BUCK file (bazel does something similar bazel ) they go with the approach of //<relative path>:<project-name>
. Doing this would require users to generate their projects from the root of their source code and passing in the path to XcodeGen
.
As an example lets assume we have a folder structure like this.
apps/
app_1/
...
dependencies:
- //libs/libs_1
- //libs/libs_3
...
app_2/
...
dependencies:
- //libs/libs_2
...
libs/
lib_1/
...
dependencies:
- //libs/libs_2
...
lib_2/
...
...
lib_3/
...
...
Carthage/
...
We could achieve this by introducing a new project
dependency type which takes in a string prefixed with //
and generating an .xcodeproject
per project.yml
and all of its dependencies.
Running XcodeGen //apps/app_1
would generate a workspace for app_1
at apps/app_1/App_1.xcworkspace
as well as .xcproject
in the desired project folder and all dependency folders. The workspace structure would mimic the folder structure defined in the directory.
.xcodeproject
- having nested projects might break things or make it more complex.- Framework linking will be done through implicit dependencies in the
.xcworkspace
Questions:
- Is this something
XcodeGen
should/wants to be able to do? - Is this approach too opinionated?