Skip to content

OpenStep plist decoding via PropertyListDecoder is not available on Windows and Linux #1002

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

Merged

Conversation

iCharlesHu
Copy link
Contributor

Added fallback implementation for OpenStep to match the functionalities of 5.10 toolchain.
resolves: rdar://136243566

@iCharlesHu iCharlesHu requested a review from kperryua October 23, 2024 21:04
@iCharlesHu
Copy link
Contributor Author

@swift-ci please test

@iCharlesHu iCharlesHu merged commit 7bb4100 into swiftlang:main Oct 23, 2024
3 checks passed
@iCharlesHu iCharlesHu deleted the charles/PropertyListDecoder-OpenStep branch October 23, 2024 21:24
@marcosgriselli
Copy link

@iCharlesHu is there any workaround to this problem until the fix lands in a Swift release?

@kperryua
Copy link
Contributor

Unfortunately not.

cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
…indows and Linux (swiftlang#1002)

resolves: rdar://136243566

Co-authored-by: Kevin Perry <[email protected]>
waltflanagan added a commit to tuist/XcodeProj that referenced this pull request Feb 27, 2025
This need a fix that is in swift 6.1 to pass on linux:
swiftlang/swift-foundation#1002
waltflanagan added a commit to tuist/XcodeProj that referenced this pull request Feb 28, 2025
This need a fix that is in swift 6.1 to pass on linux:
swiftlang/swift-foundation#1002
fortmarek pushed a commit to tuist/XcodeProj that referenced this pull request Mar 17, 2025
…tings` (#903)

* Introduce `BuildSetting` enum to enable strongly typed setting serialization

* Migrate `BuildSettings` to use `BuildSetting` enum.

* Remove unused method that was the result of another PR’s rebase.

* Fix equality on `XCBuildConfiguration`

* Update `PlistValue` to write `BuildSetting` correctly

* Fix Tests

* Fix tests

This was fun. `NSDictionary(buildSettings)` is not able to be compared because we wrap swift values so we must use `==` on the swift types since they are not concrete and equatable.

* Fix tests

* Linting

* Allow string literal interpolation

* Convert `PBXBuildFile` settings to strong types.

The settings here are constrained to two cases, one as a string and one as a string array as defined here: https://buck.build/javadoc/com/facebook/buck/apple/xcode/xcodeproj/PBXBuildFile.html

Given the narrow use case we should constraint the available types here to fit the need.

* Add tests

* Linting

* Fix pbxbuildfile equality

* Add easy access to build setting values

* Strongly typed classes tho these appear to always be empty

* Strongly typed attributes

XcodeGen introduced the ability to include whole `PBXObject` values within these dictionaries which end up being written to the project as their reference string value.  In order to simplify the attributes interface, i’m removing that capability and consumers will need to do their own unwrapping.

* linting

* Convenience accessors for BuildFileSetting

* Remove deprecated `parallelizable`

* Silence sendability warnings

* Conform `BuildSetting` to `CustomStringConvertible`

* Extract `BuildFileSettings` to own file and convert tests to SwiftTesting

* Extract ProjecteAttributes to own file

* Delete commented code

* Linting

* Add bool bridging to `BuildSetting`

* Update to Swift 6

* Update from `#file` to `#filePath` for swift 6

* Try to get the right swift version on linux

* Maybe 6.0.3 fixes the issue

* Migrate to `XCTUnwrap` to avoid `!` which will crash the test suite and not give an accurate failure count

* Revert to 6.0.2

6.0.3 is not supported and also doesnt have a fix we need.

* Fix tests

* Exclude tests that need `plist` serialization from linux

This need a fix that is in swift 6.1 to pass on linux:
swiftlang/swift-foundation#1002

* Lint fixes

* moar linting

* Add specific `targetReference` to `ProjectAttribute`

Also removed `Encodable` conformance as we have a custom `plist` method that is used for writing.

* Linting

* Add Hashable and literal expressibility for Tuist Tests

* Linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants