* Add .context to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Validate empty source paths to prevent project root inclusion (#1595)
Empty/null source entries (e.g. bare `-` in YAML) resolve to the project
root, causing extreme memory usage. Add validation to reject them with a
clear error message.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Added ProjectFormat enum with specific for each version fields
* Added ability to specify project format version via `projectFormat` option
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Add explicitFolders support to syncedFolder
Adds an `explicitFolders` property to `TargetSource` that is expanded from Glob patterns and passed through to `PBXFileSystemSynchronizedRootGroup`.
* Fix syncedFolder sources ignoring createIntermediateGroups
When createIntermediateGroups was enabled and a syncedFolder source had a
multi-component path (e.g. SyncedParent/SyncedChild), two things went wrong:
1. The synced folder was unconditionally added to rootGroups, causing it
to appear both at the project root and inside the correct intermediate
parent group.
2. The synced folder kept its full project-relative path instead of being
made relative to its parent group, so Xcode concatenated them into a
wrong path (e.g. SyncedParent/SyncedParent/SyncedChild).
* Enhance PBXFileElement to recognize synced folders as groups that can be sorted
* Fix membership exceptions for nested synced folder with intermediate groups
* Update Changelog
* Custom error handler
* Check for error reason and expected type
* Improvements
* Update CHANGELOG.md
* Update master (#1)
* Update CI equipments and drop Xcode 15 support (#1548)
* Add validation to ensure that settings.configs values are dictionaries, in order to prevent misuse (#1547)
* Add validation to ensure settings.configs values are dictionaries to prevent misuse
* Add tests for invalid settings.configs value formats
* Replaced with filter and split into a function
* Rename invalidConfigsFormat to invalidConfigsMappingFormat
* Add comments to explain invalid fixture
* Rename test fixture
* Update CHANGELOG.md
* Correct grammer
* Use KeyPath instead of closure
* Rename validateMappingStyleInConfig to extractValidConfigs
* Add a document comment for extractValidConfigs(from:)
* Use old testing api and remove EquatableErrorBox
* Rename test case to use "mapping" instead of "dictionary"
* Add ValidSettingsExtractor to encapsulate the logic for converting a dictionary to Settings
* Add settings validation for both Target and AggregateTarget
* Add tests for invalid settings.configs in Target and AggregateTarget
* Add document comments for ValidSettingsExtractor
* Rename ValidSettingsExtractor to BuildSettingsExtractor
* Add settings validation for settingGroups
* Add tests for settingGroups
* Rename extract to parse
* Refactor
* Update Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Synced folders (#1541)
* update xcodeproj to 8.27.7
* add syncedFolder source type
* drop xcode 15 support
* Rely on fileReference instead of adding new synchronizedRootGroup (#1557)
* fix: don't include untracked children in cache
---------
Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
* Use USER env var instead of LOGNAME (#1559)
During user switch with su/sudo in system LOGNAME may not be initialised, but USER env var is always exist.
* Address Sanitizer options in run/test schemes (#1550)
* Expose address sanitizer flags in run and test BuildActions in Schemes
* Update testJSONEncodable to test the new fields
* Also test the asan setting values for run scheme
* Update changelog
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Update to 2.44.0
# Conflicts:
# CHANGELOG.md
---------
Co-authored-by: Kohki Miki <giginet.net@gmail.com>
Co-authored-by: Ryu <87907656+Ryu0118@users.noreply.github.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
Co-authored-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
Co-authored-by: Himanshu Kumar <7786778+hi-kumar@users.noreply.github.com>
* Revert
* Refactoring started
* func json(atKeyPath keyPath: String) -> String?
* All cases
---------
Co-authored-by: Kohki Miki <giginet.net@gmail.com>
Co-authored-by: Ryu <87907656+Ryu0118@users.noreply.github.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
Co-authored-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
Co-authored-by: Himanshu Kumar <7786778+hi-kumar@users.noreply.github.com>
* Added `customWorkingDirectory` and `useCustomWorkingDirectory` properties to `Scheme.Run`
* Use new `customWorkingDirectory` and `useCustomWorkingDirectory` when generating `XCScheme.LaunchAction`
* Updated ProjectSpec.md to document new `customWorkingDirectory` and `useCustomWorkingDirectory` properties
* Fix for not setting customWorkingDirectory in the toJSONValue function
* Added test to make sure usCustomWorkingDirectory value is true when the customWorkingDirectory is set to non nil
* Change to infer the value of SchemaGenerator.LaunchAction.useCustomWorkingDirectory based on the value of Schema.Run.customWorkingDirectory
* Removed useCustomWorkingDirectory from the project spec now that it is no longer user defined.
* Expose address sanitizer flags in run and test BuildActions in Schemes
* Update testJSONEncodable to test the new fields
* Also test the asan setting values for run scheme
* Update changelog
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* update xcodeproj to 8.27.7
* add syncedFolder source type
* drop xcode 15 support
* Rely on fileReference instead of adding new synchronizedRootGroup (#1557)
* fix: don't include untracked children in cache
---------
Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
* Add validation to ensure settings.configs values are dictionaries to prevent misuse
* Add tests for invalid settings.configs value formats
* Replaced with filter and split into a function
* Rename invalidConfigsFormat to invalidConfigsMappingFormat
* Add comments to explain invalid fixture
* Rename test fixture
* Update CHANGELOG.md
* Correct grammer
* Use KeyPath instead of closure
* Rename validateMappingStyleInConfig to extractValidConfigs
* Add a document comment for extractValidConfigs(from:)
* Use old testing api and remove EquatableErrorBox
* Rename test case to use "mapping" instead of "dictionary"
* Add ValidSettingsExtractor to encapsulate the logic for converting a dictionary to Settings
* Add settings validation for both Target and AggregateTarget
* Add tests for invalid settings.configs in Target and AggregateTarget
* Add document comments for ValidSettingsExtractor
* Rename ValidSettingsExtractor to BuildSettingsExtractor
* Add settings validation for settingGroups
* Add tests for settingGroups
* Rename extract to parse
* Refactor
* Update Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Support preferred screen capture format in scheme test action (resolves#1443)
* preferredScreenCaptureFormat decoding test
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Respect relativePaths in local package paths
Before this a local package defined in an included file would not
respect relativePaths: true.
This fixes#1497.
* Test local package with relative path
* add relative paths support to localPackages syntax
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Reject multiplatform apps that support the watchOS destination
This commit also fixes existing test cases.
* Add test cases
* Update docs
* Update changelog
* Support for xcode 15 string catalogs
* Add sample string catalog to Test Fixture and basic test to check that asset catalogs are added in the resources build phase
* Restore unintended changes
* Update Pull Request number for 'Support for Strings Catalogs' in changelog
* Update fixture yml generator
* Detect knownRegions based on locales in string catalogs
* platformFilters on Dependecies
* platformFilters on sources
* fixed current unit tests
* renamed enum to SupportedPlatforms
* supportedPlatforms field for target
* errors
* renamed errors
* inferPlatformFiltersByPath flag
* changed priority to generate filter
* fixed parsing
* fixed init
* unit test supportedPlatforms
* unit tests for errors
* fixing build settings and unit tests
* added new settingsPresets
* new check errors and unit tests
* case insensitive match
* fixed skipping cross platform target
* json decode
* unit tests inferPlatformFiltersByPath and platformFilters for sources
* mocked files
* fixing unit tests
* first test on dependecies
* unit tests completed
* fixed unit tests
* changelog
* doc changes
* doc changes
* doc changes
* doc changes
* doc changes
* doc changes
* doc changes
* doc changes
* fixed doc
* fixed unti tests style
* fixed regex
* fixed doc
* addressing comments
* Added TestProject, moved unit tests resources in another folder
* Raising error if platform is an array
* unit test on new error
* fixed error enum
* Integrated in TestProject
* committed TestProject
* unit test error
* fixing spm deps in test project
* pushed testProject
* pushed testProject
* pushed testProject fix
* comment on isResolved property
* renameing supportedPlatforms to supportedDestinations
* renameing supportedPlatforms to supportedDestinations
* renameing test app
* checked out old file
* fixing test app
* working on auto baseSDK
* fixed deploymentTarget
* renamed errors
* fixed presets
* remamed index to priority
* small comments
* removed isResolved in target and fixed error check
* added unit tests
* fixed doc
* fixed doc
* fixed doc
* fixed doc
* fixed test app
* add visionOS and more error check and testing
* fixed supported destinations priority and tests
* fixed doc
* solved conflicts
* fixed conflicts
* renamed everything
---------
Co-authored-by: Giovanni Amati <giovanni.amati@sky.uk>
* Display absolute path in invalidBuildScriptPath error print.
With previous implementation, the error message was not clear for end user:
Spec validation error: Target "Project" has a script "SwiftLint" which has a path that doesn't exist "../../wrong-dir/scripts/run_swiftlint_in_xcode_wrapper.sh"
With new implementation with absolute path, it is easier to validate what is wrong with path:
Spec validation error: Target "Project" has a script "SwiftLint" which has a path that doesn't exist "/Users/SomeUser/dev/fancy-project/wrong-dir/scripts/run_swiftlint_in_xcode_wrapper.sh"
* Display absolute path for invalidTargetConfigFile error print.
Without patch:
2 Spec validations errors:
- Target "MM" has invalid config file "../../xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Debug"
- Target "MM" has invalid config file "../../xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Release"
After fix:
2 Spec validations errors:
- Target "MM" has invalid config file path "/Users/MyUser/dev/myproject/xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Release"
- Target "MM" has invalid config file path "/Users/MyUser/dev/myproject/xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Debug"
* feat: Add possiblity to add resources before the sources build phase;
* feat(ios): Add change to Docs + CHANGELOG;
* fix: rename resourcesBeforeSourcesBuildPhase to putResourcesBeforeSourcesBuildPhase to make it more clear;
* Update CHANGELOG.md
---------
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Sanitize the ends of folder source paths
Setting the source: `/foo/bar` is _sometimes_ different from `/foo/bar/` even if `bar` is a folder in both cases. The result of this is that we often run into a race condition where we have two objects with the same hash but different properties. This fixes#1339 and #1131.
* Update CHANGELOG.md
* Update TargetSource.swift
* Update TargetSource.swift
* Update TargetSource.swift
* Resolves#173 - Shared breakpoints support
* Added breakpoints full documentation
* Invalid breakpoint just throw JSONUtilities decoding error.
* Use enumeration types instead of String for extensionIDs
* Remove a necessary line
* Remove unnecessary custom Equatable implementation
* Update CHANGELOG.md
* Ignore empty breakpoints
* Update Docs/ProjectSpec.md
Fix a typo
Co-Authored-By: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Change some properties that should be Int to Int
* Create 2 typealiases
* Use BreakpointType where it is missing
* Remove unused Location
* Change some names
* Add Breakpoint.Scope
* Add Breakpoint.StopOnStyle
* Change the type of the raw value to String
* Remove some properties that may cause confusing
* Require filePah and line when the type is .file
* Add tests about decoding breakpoints
* Add Breakpoint.Action.ConveyanceType
* Add default value for waitUntilDone
* Add Breakpoint.Action.SoundName
* Add tests about decoding breakpoint actions
* Fix some issues in ProjectSpec.md
* Improve ProjectSpec.md
* Add missing condition
* Add breakpoints to project.yml
* Use unwarp
* Remove the Breakpoint suffix
* Refactor BreakpointType
* Refactor Breakpoint.Action
* Remove unnecessary properties
* Adjust the line wrapping style for BreakpointGenerator
* Support column breakpoints
---------
Co-authored-by: Alex Rupérez <alejandro.ruperez@intelygenz.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
* Added test for when includes contain relative paths with the same name.
* Updated mergedDictionary to handle includes with the same file path.
* Removed the need to multiple places to pass in cachedSpecFiles.
* Converts the projectRoot into a absolute path before loading a project.
* Updated changelog.
* 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
* 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
**Reason**
- More strict validation of added dependencies
**Contents**
- Added changelog entry
- Added check for duplicates in validation stage
- Added test
* 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>