yonaskolb / yonaskolb/XcodeGen

[RFC] Workspace generation

Open
#168 13 comments 25 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

thread
Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the XcodeGen CLI invocation and the project.yml dependency examples described in the issue. No source files or tests are identified; the work is not ready until the workspace-generation approach and dependency semantics are agreed and an implementation scope is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.