-
Notifications
You must be signed in to change notification settings - Fork 846
Handle major.minor for SPM #1546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Sources/ProjectSpec/Project.swift
Outdated
@@ -193,7 +193,19 @@ extension Project { | |||
attributes = jsonDictionary.json(atKeyPath: "attributes") ?? [:] | |||
include = jsonDictionary.json(atKeyPath: "include") ?? [] | |||
if jsonDictionary["packages"] != nil { | |||
packages = try jsonDictionary.json(atKeyPath: "packages", invalidItemBehaviour: .fail) | |||
packages = try jsonDictionary.json(atKeyPath: "packages", invalidItemBehaviour: .custom({ error in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm missing something, the fix could live directly in SwiftPackage.VersionRequirement(jsonDictionary: JSONDictionary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @yonaskolb
It's possible since I'm not very familiar with the project)
This isn't strictly a bug in XcodeGen but rather in how YAML handles number literals. Doesn't mean it's not worth supporting numbers as well though |
* Update CI equipments and drop Xcode 15 support (yonaskolb#1548) * Add validation to ensure that settings.configs values are dictionaries, in order to prevent misuse (yonaskolb#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 <[email protected]> * Synced folders (yonaskolb#1541) * update xcodeproj to 8.27.7 * add syncedFolder source type * drop xcode 15 support * Rely on fileReference instead of adding new synchronizedRootGroup (yonaskolb#1557) * fix: don't include untracked children in cache --------- Co-authored-by: Kirill Yakimovich <[email protected]> * Use USER env var instead of LOGNAME (yonaskolb#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 (yonaskolb#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 <[email protected]> * Update to 2.44.0 # Conflicts: # CHANGELOG.md --------- Co-authored-by: Kohki Miki <[email protected]> Co-authored-by: Ryu <[email protected]> Co-authored-by: Yonas Kolb <[email protected]> Co-authored-by: Kirill Yakimovich <[email protected]> Co-authored-by: Kanstantsin Shautsou <[email protected]> Co-authored-by: Himanshu Kumar <[email protected]>
Update master again
Hello @yonaskolb |
Hello.
Thank you for XcodeGen.
Fixed #1545
To fix it, I added custom
invalidItemBehaviour
for SPM packages decoder. Now if package version was detected as 6.0 (number), theninvalidItemBehaviour
converts it to "6.0" (string).