Commit Graph

687 Commits

Author SHA1 Message Date
Yonas Kolb
fd24307120 add a dependency test case 2022-12-09 21:35:17 +11:00
Kazumasa Shimomura
a607d0a0d2
Delete ignored try keyword. (#1298) 2022-12-09 18:11:20 +11:00
Mathieu Olivari
e7f753785e
Fix includes related issues and improve their performances (#1275)
* 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
2022-11-03 19:05:46 +11:00
Bobby Sudekum
6f331720c9
Add enableGPUFrameCaptureMode to Scheme (#1251) 2022-09-09 18:43:39 +10:00
freddi(Yuki Aki)
594c67fbe9
Add enable option for include to enable optional including for addtional spec (#1242)
* 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
2022-08-12 16:21:43 +10:00
Steven Sheldon
e9295f1ff3
Fix profile action to not run frameworks (#1245)
* 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>
2022-08-11 22:45:06 +10:00
antonsergeev88
ff552f3880
Handle mlmodelc as a single unit (#1237)
* Handle mlmodelc as a single unit

* Add mlmodelc support in changelog
2022-07-31 18:33:20 +10:00
Aleksei Sapitskii
24572daeb5
Added duplicate dependencies validation (#1234)
**Reason**
 - More strict validation of added dependencies

**Contents**
 - Added changelog entry
 - Added check for duplicates in validation stage
 - Added test
2022-07-24 16:08:33 +10:00
matsuji
da8aad004f
Add a new CopyFilesBuildPhase, "Embed ExtensionKit Extensions" (#1230)
* 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
2022-07-21 21:25:34 +10:00
Aleksei Sapitskii
c082bc0c7c
Fix XcodeGen building after XcodeProj update to 8.8.0 (#1228)
* 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>
2022-07-16 16:46:42 +10:00
Yonas Kolb
0822efa5bd
update xcodeproj (#1213) 2022-05-10 15:03:39 +10:00
Yonas Kolb
e35f7df14d
Add Test Plans (#716)
* 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>
2022-05-10 13:27:31 +10:00
Yuya Hirayama
047e9968d6
Fix docc support (#1202)
* Update FileType.swift

* Update SourceGeneratorTests.swift

* Update fixture

* Update CHANGELOG.md
2022-04-05 14:08:02 +10:00
Vladislav Lisyanskiy
50aa8c51cc
Fixed segmentation fault crash (#1198)
* Fixed glob segmentation fault

* Renamed AtomicDictionary to ThreadSafeDictionary

* Refactored ThreadSafeDictionary

* ThreadSafeDictionary replaced with ThreadSafeContainer

* Removed reader/writer

* ThreadSafeContainer replaced with Atomic
2022-03-31 16:15:58 +11:00
John Connolly
be0c3c3926
Added ability to use custom location for local Swift packages (#1175)
* Added xcodePath functionality

* Added xcodePath functionality

* Renamed Xcode path to group

* Updated change log and added fixture tests
2022-03-25 11:26:06 +11:00
Maxim Bunkov
8530da5d00
fix(carthage): shell login (#1179)
* fix(carthage): shell login

* tests(fixtures): update fixtures

* tests(changelog): update changelog
2022-03-22 10:24:41 +11:00
yonaskolb
f6cdd090c2 use new TestableTargetReference in TargetScheme.coverageTargets 2022-03-20 14:44:14 +11:00
freddi(Yuki Aki)
245f17117a
Support test target for local Swift Package (#1169)
* 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>
2022-03-20 14:27:29 +11:00
Evan Coleman
7b9d95ab4c
Skip compile sources for watch apps (#1185)
* Skip compile sources build phase for watch2 apps if empty

* add changelog entry

* Fix tests

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2022-03-20 14:19:23 +11:00
Gabriel Lanata
3b5ca91b76
Add coverage targets for target schemes (#1189)
* Changes

* Tests and docs

* Update fixtures

* Update CHANGELOG.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2022-03-17 15:56:03 +11:00
Kristopher Jackson
c62277f150
Added location option to test target (#1153)
* Added location option to test target

* Updated XcodeProj

* Updated packages

* Removed extra toJSONValue()

* Update Docs/ProjectSpec.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Update Sources/ProjectSpec/Scheme.swift

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Update Sources/ProjectSpec/Scheme.swift

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Removed optional location

* Renamed SimulateLocation to Location

* Removed Location struct and just pass location string directly

* Added tests for location with a test target

* Added example of location inside test target to project.yml

* Removed extra test target and add location to existing target

* Updated App_Scheme.xcscheme

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2022-01-07 11:09:58 +11:00
Paul Taykalo
10fb43137b
Speed up search by using parallel Glob and Binary Search for including files checks (#1122)
* Use binary searchi for Checking if path is included in included files

* Do not run glob in parallel on Linux systems
2021-10-08 09:20:19 +11:00
Michael Thole
fa6c5c9173
Fix Xcode 13 build (alternate PR to kick CI) (#1130)
* Fix Xcode 13 build

* Extend Xcode 12 workaround to Xcode 13

* Update CHANGELOG

* Moved CHANGELOG into 'Next Version' section

Co-authored-by: Kryštof Matěj <krystof.matej@cleverlance.com>
2021-09-24 09:11:10 +10:00
Kryštof Matěj
12511afed8
Fix platformFilter for package dependencies (#1123) 2021-09-14 23:11:25 +10:00
Yuta Saito
a4d7a61a68
Fix broken codesign option for bundle dependency (#1104)
* Fix missing codesign option for bundle dependency

* Add codeSign: false test case for bundle dependency

* Update CHANGELOG.md
2021-07-15 19:06:33 +10:00
Jakub Bednar
d35d22f08b
Added support for dependency destination specification. (Resolves #1038) (#1039)
* Added support for dependency destination specification. (Resolves #1038)

* More generic way covering more different dependency types. (#1038)

* Added unit-test for each possible dependency combination. First test current embeding then the new one with custom copy spec. (#1038)

* Review fixes. (#1038)

* Minimized unit-test boiler-plate (#1038)

* Update CHANGELOG.md

Co-authored-by: Jakub Bednář <jakub.bednar@avast.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-07-15 12:10:34 +10:00
Dalton Claybrook
66b1db4b5c
Add support for specifying the UI testing screenshot behavior in a scheme test action (#942)
* Support for specifying UI testing snapshot behavior in scheme test action

* Add tests for new screenshot scheme options

* Update changelog

* Add new fields to Scheme.Test json encoding

* Only save values to JSON if they aren't the defaults

* Using new defaults constants
2021-06-27 22:25:26 +10:00
Dalton Claybrook
81bd52be4b
Add support for conditionally linking dependencies based on platform (#1087)
* Add initial support for conditional platform dependencies

* Add tests for conditional platforms

* Update docs and changelog

* Respond to PR feedback

* Change name of field from 'conditionalPlatforms' to 'platforms'

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-06-20 20:19:02 +10:00
Vlad Gorlov
4455919be3
Added support for "driver-extension" and "system-extension" product types (#1094)
* Squashed commit of the following:

commit 0bcdce0d1f0f1d13fb5a284404e4eaea4e805a89
Author: Vlad Gorlov <volodymyr.gorlov@gmail.com>
Date:   Fri Jun 18 00:58:50 2021 +0200

    [#1092] Dependency version update.

commit 0040c46fd4ce9f42102faeb744104027b6c2c757
Author: Bruce Evans <bruce.evans.dev@gmail.com>
Date:   Wed Jun 16 09:12:01 2021 +0900

    Add Support for DocC in Xcode 13 (#1091)

    * Add support for DocC

    DocC "files" are actually folders `.docc` appended to the name, but Xcode 13 treats them differently. Therefore, we need to exclude them from the normal BuildPhase.

    Resolves #1089

    * Add tests for DocC

    Expanded an existing test to include .docc support.

    Also added a .docc catalog to the Test Project.

    * Update changelog.md

    * Update changelog.md to get the correct PR Link

commit 5bb7ef4e1c632f80f63c49ee280d64b8dab1603f
Author: Vlad Gorlov <volodymyr.gorlov@gmail.com>
Date:   Wed Jun 16 01:03:42 2021 +0200

    Added support for missed product types.

commit 3f8bfdf749d0d15da8490550b95a31cf961d8649
Author: Vlad Gorlov <volodymyr.gorlov@gmail.com>
Date:   Wed Jun 16 00:01:47 2021 +0200

    Added support for missed product types.

commit 235ebe4fe906716a6a37421346318fc6515836ce
Author: Vlad Gorlov <volodymyr.gorlov@gmail.com>
Date:   Tue Jun 15 23:53:52 2021 +0200

    Added support for missed product types.

* [#1094] Fixes failing tests.

* [#1094] Added test project targets.

* [#1094] Making iig-file type of source code.

* [#1094] Attempt to fix CI failure.
2021-06-20 14:08:38 +10:00
Bruce Evans
b8af21d12f
Add Support for DocC in Xcode 13 (#1091)
* Add support for DocC

DocC "files" are actually folders `.docc` appended to the name, but Xcode 13 treats them differently. Therefore, we need to exclude them from the normal BuildPhase.

Resolves #1089

* Add tests for DocC

Expanded an existing test to include .docc support.

Also added a .docc catalog to the Test Project.

* Update changelog.md

* Update changelog.md to get the correct PR Link
2021-06-16 10:12:01 +10:00
Elliott Williams
8bfa2f33e4
Revert "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)" (#1081)
* Revert "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)"

This reverts commit 7b8f5a117f.

* Don't actually revert the changelog entry

* ProjectSpec.md: document how to link an xcframework

* Update CHANGELOG.md
2021-05-22 10:32:09 +10:00
Kryštof Matěj
38888237c7
Add platform filter to dependencies (#951) 2021-05-18 20:52:24 +10:00
David Lee
b6d87a1cc6
added () to config variant trimming character set (#1078)
* added () to config variant trimming character set

* added test cases

* added test cases and changelog entry

* Update CHANGELOG.md

removed

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* fixed incorrect test case

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-05-16 17:12:04 +10:00
freddi(Yuki Aki)
4233cc8578
Support runPostActionsOnFailure on build scheme (#1075)
* supports runPostActionsOnFailure on build scheme

* updates test for runPostActionsOnFailure

update runPostActionsOnFailure tests

* update Docs for runPostActionsOnFailure

* update change log

* Update CHANGELOG.md

* Update CHANGELOG.md
2021-05-06 12:54:33 +10:00
Yonas Kolb
7c510af3d7
Fix Xcode alert on generation (#1072)
* fix xcode warning alert on regeneration

* commit fixture diffs

* update changelog
2021-05-06 08:33:42 +10:00
Yonas Kolb
8a0615e883
Fix config variant lookup (#1070)
* fix config lookup

* update changelog
2021-05-06 00:07:38 +10:00
Stefano Mondino
dfe7f28bcb
Scheme config variants wrong assignment for similar config names (#976)
* Failing test for #975

* fixes #975

* chore: refactor to properly select a config from a collection with specific variant and config type
chore: updated changelog

* fix: lowercase compare on config variant names

* fix CI

* fix missing scheme for CI

* fix schemes for CI

* Update CHANGELOG.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Update Sources/ProjectSpec/Config.swift

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* - fix compilation issue
- duplicated test for config variant name (uppercase/lowercase)

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-05-01 15:50:39 +10:00
Elliott Williams
fb559ba153
CarthageDependencyResolver: ignore order-only dependencies (#1041)
* CarthageDependencyResolver: ignore target-only dependencies

* Update fixtures for expected changed in watchOS apps' FRAMEWORK_SEARCH_PATHS

* Update CHANGELOG.md
2021-05-01 15:39:55 +10:00
Elliott Williams
35212a6154
Rename Core to avoid collisions with other packages (i.e. GraphViz) (#1057)
* Rename 'Core' to 'XcodeGenCore'

* Update CHANGELOG.md

* Update CHANGELOG.md
2021-05-01 13:39:34 +10:00
freddi(Yuki Aki)
56f943ec01
Support weak link for Swift Package Dependency (#1064)
* support weak link to Swift Package dependency

* update test for weak link

* add changelog about Swift Package Dependency

* Update CHANGELOG.md
2021-05-01 13:09:19 +10:00
Artem Semavin
0ac7a5f8c6
Added support for SelectedTests in schemes Test configuration. (#913)
* added support for selectedTests in test shemes

* added PR description to changelog

* CHANGELOG fix

* use presence of selectedTests for useTestSelectionWhitelist

Co-authored-by: Artem Semavin <Artem Semavin>
Co-authored-by: yonaskolb <yonaskolb@gmail.com>
2021-04-08 23:01:28 +10:00
André
209afcc898
Allowing override LastUpgradeCheck and LastUpgradeVersion (#1013)
* Allowing the property LastUpgradeCheck and LastUpgradeVersion to be overrided

* Updating changelod and project spec

* Updating changelog

Co-authored-by: André Lucas Ota <andrel.ota@PPM-SPO-6835.local>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-04-08 22:20:10 +10:00
Franz Busch
7b8f5a117f
Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)
* Change FRAMEWORK_SEARCH_PATH for xcframeworks

* Apply suggestions from code review

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-04-08 22:20:01 +10:00
Liam Nichols
1b57ba5c75
Improve INFOPLIST_FILE handling to only omit used Info.plist's from Copy Bundle Resources Build Phase (#1027)
* Update TestProject Fixture to include GoogleService-Info.plist resource bsaed on 2.18.0 generator

* Update TestProject fixture to include an Info.plist file named 'App-Info.plist' to simulate scenario in #945

* Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target

* fixup! Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target

* fixup! Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target

* Refactor SourceGenerator to remove some redundant arguments on internal methods when generating source files in a target

* Update SourceGenerator to accept '[Path: BuildPhaseSpec]' of preferred build phases in order to prioritise over 'default' value. Remove explicit Info.plist check from SourceGenerator. Update PBXProjGenerator to inject hash of build phases for resolved INFOPLIST_FILE values. Update SourceGeneratorTests to comply with change where only the FIRST Info.plist is excluded from copy bundle resources build phase, additionally resolve absolute path

* Ensure project.basePath is always absolute when resolving Info.plist path relative to project

* Add test coverage in SourceGeneratorTests.swift

* Update CHANGELOG.md

* Reword CHANGELOG.md
2021-04-08 15:38:21 +10:00
freddi(Yuki Aki)
cf88681749
Support macroExpansion on run scheme (#1036)
* allow to specify macroExpansion on schemes

* fix json parsing on macroExpansion

* set macroExpansion only launch scheme

* add test for macroExpansion

* add macroExpansion description

* add macroExpansion to Change Log

* Update CHANGELOG.md

* add App_Extension scheme for macroExpansion

* change example of macroExpansion in Fixtures project

* fix to keep back to keep back compatibility as possible

* Apply suggestions from code review

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-03-21 20:02:01 +11:00
freddi(Yuki Aki)
f550d01678
Support askForAppToLaunch on profile scheme (#1035)
* add askForAppToLaunch to profile scheme

* add test

* add description for askForAppToLaunch

* add Change Log for askForAppToLaunch

* Update Docs/ProjectSpec.md
2021-03-17 18:10:04 +11:00
Yonas Kolb
e8237903ef
add github helper for swift package url (#1029) 2021-02-24 21:23:21 +11:00
Joseph Colicchio
05ea968f70
Bugfix/StoreKitConfiguration BuildPhase (#1026)
* Copy storekit to bundle resources by default

* Fix tests

* Update changelog
2021-02-24 08:33:54 +11:00
Joseph Colicchio
ae186edb68
Bugfix/SimulateLocation Fix (#973)
* Preemptively fix compilation for latest XcodeProj

* Add StoreKitConfiguration to scheme and generator

* Add scheme generator test

* Fix and add tests

* Support StoreKitConfiguration in TargetScheme

* Set default type of `storekit` to `.none`

* Upgrade XcodeProj to 7.15.0

* Create struct for StoreKitConfiguration

* Update tests

* Add storekit configuration to test project

* Update changelog

* Update project spec

* Fix xcodeprojs

* Fix projects

* Capitalize String

* Update CHANGELOG.md

Co-authored-by: Gemma Barlow <gemmakbarlow@gmail.com>

* Refactor StoreKitConfiguration init from json

* Change `forWorkspace` to `pathPrefix` and add tests

* Replace StoreKitConfiguration struct with string + option

* Fix tests

* Update project spec

* Fixup changelog

* Add `See Options` to `storeKitConfiguration` in project spec

* Make `simulateLocation` respect `schemePathPrefix`

* Update docs

Co-authored-by: Gemma Barlow <gemmakbarlow@gmail.com>
2021-02-16 09:35:47 +11:00
Bartosz Polaczyk
2c600a7c64
Add Discovered Dependency File (#1012)
* Upgrade XCodeProj to 7.14.0

* Bump to XcodeProj to fork

* Add script discoveredDependencyFile

* Align cfbundle test

* Add changelog mock

* Update Documentation

* Update SPM manifest

* Change property name

* Verify defult dependency file to nil

* Add JSON encodable test

* Add PR number

Co-authored-by: Fernanda Geraissate <fernandag@spotify.com>
2021-02-15 12:43:41 +11:00