* Fix recursive include path when relativePath is not set
If relativePath is not set on a particular include, the first level of
include will currently work, but starting at the second level of
iteration, the computed include path will fail as relativePath will be
appended over and over onto the filePath. We're fixing that recursion
problem here and adding the corresponding tests to make sure it doesn't
happen again.
* Include projectRoot in include paths
The projectRoot setting (when specified) is currently ignored when
computing the include paths. We're fixing that in that commit.
* Use memoization during recursive SpecFiles creation
SpecFile objects are created by recursive through includes. On a large
project with programatically generated SpecFile, it is not rare to have
hundreds of SpecFiles, creating a large web of include dependencies.
In such a case, it is not rare either for a particular SpecFile to be
included by multiple other SpecFiles. When that happens, XcodeGen
currently creates a SpecFile object every time a SpecFile gets included,
which can lead to an exponential growth of includes.
I have seen hundreds of files being turned into hundred of thousands of
SpecFile object creations, which leads to an impractical XcodeGen run of
tens of minutes.
This change adds memoization during SpecFile recursion, in order to
reuse the previously created SpecFiles, if available, instead of
re-creating them.
* Update CHANGELOG.md
Add the following changes to the changelog:
* b97bdc4 - Use memoization during recursive SpecFiles creation
* a6b96ad - Include projectRoot in include paths
* 557b074 - Fix recursive include path when relativePath is not set
* allow spec to be a comma separated list of specs instead of one
* update readme and --spec command documentation
* update Changelog
* print project name
* add new option enable for include of spec
* fix to see the environment variable when parsing include
* add test for include with environment variable
* fix how to parse boolean value
* add spec about enable for include
* add Change Log
* fix the number of PR in changelog
* fix include test to make more clear
* fix test to focus enable option more
* fix english error
* fix to expand variable only one time
* add new test case by setting environment object as NO
* Fix profile action to not run frameworks
* Add PR number to changelog
* Update CHANGELOG.md
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
**Reason**
- More strict validation of added dependencies
**Contents**
- Added changelog entry
- Added check for duplicates in validation stage
- Added test
* Embed ExtensionKit Extensions
* Fix explicitFileType for extensionKit
* Update ChangeLog
* Fix if statement structure
* Add a new example extension to Tests/Fixtures/TestProject/
* Update Tests/Fixtures/TestProject/Project.xcodeproj
* Comment out example for extension kit extension in Tests/Fixtures/TestProject/
* Update Tests/Fixtures/TestProject/Project.xcodeproj
* Fix XcodeGen building after XcodeProj update to 8.8.0
**Reason**
- XcodeProj has been updated and has API breaking changes
**Content**
- Added new enum case handling in `Linkage`
- Renamed the enum case name for `XCWorkspaceDataFileRef.init`
* add new product type to docs
* update changelog
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Speed up SettingsBuilder
It's unnecessary to build up a whole grouped dictionary only to check
if all platforms are identical and then immediately discard the
dictionary.
Instead we can check if all targets match the first platform, which
avoids creating a new dictionary but also allows bailing early as soon
as a non-matching platform is found.
Generating a large project (36MB json spec) on an M1 Max machine leads
to a ~6% total speedup: 28.48s vs 30.07s.
* Add changelog entry
* upgrade scheme and project versions
* parse test plans
* remove xctestplan from resources
* generate test plan references in schemes
* add test plan to fixture
* non-mutable way of creating [XCScheme.TestPlanReference]
* update fixture version
* Add documentation
* Add default test plan option
# Conflicts:
# Sources/ProjectSpec/Scheme.swift
# Tests/Fixtures/paths_test/included_paths_test.yml
# Tests/ProjectSpecTests/SpecLoadingTests.swift
* Add test plan validation
# Conflicts:
# Tests/ProjectSpecTests/ProjectSpecTests.swift
* Check for multiple default test plans
* set first plan as default default plan
* small tweaks
* fix test plan path properties
* add test plants to target scheme
* docs
* fix fixture test plan path
* update changelog
* added ability to disable test plan path validation
Co-authored-by: Ota Mares <ota@rebuy.com>
As this transform closure does not access anything outside of its
closure and does not mutate any singletons, then it seems to be safe
to run this mapping in parallel.
* support local Swift Package test case into test scheme
* update test
* add test
* update CHABGELOG.md
* Update CHANGELOG.md
* revert resolved package test
* Update Sources/XcodeGenKit/SchemeGenerator.swift
Co-authored-by: Kohki Miki <giginet.net@gmail.com>
* make TargetReference convert from new JSON format
* add .package for location of target reference
* receive target reference format at target of scheme
* update test
* update XcodeProj
* add test and fix small bugs
* update docs
* support multiple style of coverageTargets
* add edge case of parsing test targets
* fix docs
* Update Docs/ProjectSpec.md
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* create TestableTargetReference for not making API complex
* fix code format
* fix parameter name to Testable Target Reference
* support directly writing key of Testable Target Reference
* fix compile error in build
Co-authored-by: Kohki Miki <giginet.net@gmail.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>