Skip to content

Minor Codable conformance improvements in SwiftBuildSupport #8449

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
merged 3 commits into from
Apr 4, 2025

Conversation

pmattos
Copy link
Contributor

@pmattos pmattos commented Apr 3, 2025

Motivation:

Some of the SwiftBuildSupport/PIFBuilder.swift encoding/decoding code was using unsafe string keys. This replaces with proper typesafe keys.

This part of the ground work to support the new PIF builder in SwiftBuildSupport (i.e., rdar://147527170).

Modifications:

When conforming to Codable, replace string keys with enum based keys instead.

Result:

The resulting code is safer and easier to understand.

Tracked by rdar://148546582.

@pmattos
Copy link
Contributor Author

pmattos commented Apr 3, 2025

@swift-ci test

try super.init(from: decoder)
}
}

/// Abstract base class for all items in the group hierarchy.
public class Reference: TypedObject {
public class Reference: HighLevelObject {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a high-level object... but will go away in my next PR.

@@ -693,7 +712,7 @@ public enum PIF {
}

/// Abstract base class for all build phases in a target.
public class BuildPhase: TypedObject {
public class BuildPhase: HighLevelObject {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a high-level object... but will go away in my next PR.

@pmattos
Copy link
Contributor Author

pmattos commented Apr 4, 2025

@swift-ci test

@jakepetroules
Copy link
Contributor

@swift-ci test windows

@jakepetroules
Copy link
Contributor

@swift-ci test windows self hosted

@dschaefer2
Copy link
Member

@swift-ci please test self hosted windows

@pmattos pmattos merged commit a0fbf35 into main Apr 4, 2025
6 checks passed
@pmattos pmattos deleted the pmattos/improve-pif-Codable branch April 4, 2025 20:38
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