-
Notifications
You must be signed in to change notification settings - Fork 816
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
[RFC] Workspace generation #168
Comments
@sbarow - This is something we want as well and it seems like handling the generation of multiple projects and managing their build dependencies should be in the scope of XcodeGen. We're using Bazel over at Pinterest so I'm a bit biased in favor of your exact implementation suggestion :)
Thoughts? |
First off, this would be awesome 🥂 A couple cases I've been thinking about are:
Also, as @rahul-malik mentioned, multiple projects is key for a larger app. I'd be interested in helping move this effort forward where I can! |
Yeah! I think it'd be awesome to have such feature in XcodeGen 👏 I think it'd help a lot of companies with building modular apps. We at SoundCloud found very cumbersome to maintain a modular setup with multiple projects and workspaces. Buck & Bazel were options that we considered to do the automation but we didn't have enough resources to change our build infrastructure. The way I imagined this automation as a developer working on a modular app was:
Implementation-wise, I like @rahul-malik's approach. I think the current specification format can be extended to support as dependencies projects defined in other specification files. Do you think we would need the concept of @rahul-malik could expand this point a bit?
|
@rahul-malik on your points:
I probably worded this incorrectly. It would only implicitly link built frameworks of projects within all of the @jerrymarino on your points:
Regarding multiple projects, this is what I have working so far (includes @pepibumur to all your points, this is what I have working currently |
@sbarow awesome work! I think the answers to the first 2 points are incredibly opinionated:
The above points, can be handled today in today's project spec, but it is not trivial especially with a large number vendor dependencies 🐉 Maybe the answer is more meta: Does XcodeGen have opinionated logic that makes it easier for people to use? Or is it a higher level
|
@pepibumur - My thought on the implicit framework linkage was purely just mentioning we need to keep other output products like
|
@sbarow @pepibumur - How do you suggest moving forward? I think between all of us we have similar app architecture needs (modularization, multi-project, etc.) so I believe we can find a good solution that works for all of us. If i'm understanding the RFC correctly:
These points seem reasonable to me. In addition I'd like to suggest:
Thoughts? Would also love to know how we can break down this feature so we can all contribute and help out :) |
Yeah, this is a need may big apps have, I agree with moving this forward. What do you think about moving this RFC to a Google Docs? It'll be easier to leave comments there and think about how to break this down to do it achievable steps. |
Before opening this RFC, I worked on a version of this in Python. It might be useful to have a look at workspacegen I am happy to add you guys to this, we could use the readme as a kind of RFC/TODO list if that makes sense? Google Doc can work also. I'll work on this a bit more tomorrow and get some thoughts down on the points raised above. |
@sbarow - Thanks for sharing! Will take a look soon. @pepibumur @sbarow - I think there is value with getting an RFC doc started and I'm happy to put one together based on this conversation. One approach I thought of is that we might be able to approach this in a few phases:
|
Sounds good, would you mind sharing the one that you already started @sbarow? I think we can move from there and come up with implementation phases that we can work on, and maybe do things in parallel if it's possible. Adding to your points @rahul-malik:
|
Any progress here? |
I might be missing something, but it looks like more recent changes such as support for External Target References (#655) and soon to be support for nested subprojects (#701) solve the original discussions above? Now it is more about just generating a workspace file? I feel like that can be quite a simple task that could become really powerful if we use this to bring caching and For example, being able to run a command something like the following:
Where workspace.yml would look something like this: name: MyWorkspace
options:
postGenCommand: bundle exec pod install
settings:
# WorkspaceSettings.xcsettings things would go here
projects:
App:
path: App
spec: App/project.yml
Frameworks:
path: Frameworks
spec: Frameworks/project.yml I'm coming at this from the perspective where I don't really need XcodeGen to generate me a workspace since CocoaPods will do it however there is a benefit by adding support to XcodeGen since it'll allow us to utilise caching to only run |
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 anotherlib/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 toXcodeGen
.As an example lets assume we have a folder structure like this.
We could achieve this by introducing a new
project
dependency type which takes in a string prefixed with//
and generating an.xcodeproject
perproject.yml
and all of its dependencies.Running
XcodeGen //apps/app_1
would generate a workspace forapp_1
atapps/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..xcworkspace
Questions:
XcodeGen
should/wants to be able to do?The text was updated successfully, but these errors were encountered: