tuist/Sources/TuistGenerator/Writers
Kas 70676b0e89
Concurrent project generation (#1096)
- Each project within a workspace is currently generated independently and non of the project share any mutable state
- The graph is static during the generation process
- As such one option to gain some overall performance improvement is to generate project concurrently as well serialise them to disk concurrently.
- An additional stress test was added to ensure there were no concurrency issues during workspace generation
- The test logger needed some small thread safetey improvement
- Fix concurrency issues in Atomic
- Leverage execution contexts to control threading behavior of components
- Update `XcodeController` to minimize synchronization calls (via `Atomic`)

Test Plan:

- Verify all automated tests pass
- Stress test tuist via running this script in the `fixtures` directory

```sh
#!/bin/bash -e

# skip fixtures that are testing failure cases
declare -a skipped_fixtures=(
    "invalid_workspace_manifest_name" 
    "ios_app_with_incompatible_dependencies" 
    "ios_app_with_incompatible_xcode" 
    "ios_workspace_with_dependency_cycle"
)

# Generate all fixtures in a loop
for i in {1..20}; do
    for f in *
    do
        if [[ ! " ${skipped_fixtures[@]} " =~ " ${f} " ]]; then
            if [[ -d $f ]]; then
                echo ">> Generating: $f"
                swift run tuist generate --path $f
                echo ""
            fi
        fi
    done
done
```
2020-03-17 10:32:44 +00:00
..
XcodeProjWriter.swift Concurrent project generation (#1096) 2020-03-17 10:32:44 +00:00