apple / apple/swift-system

FilePath is Decodable, but not from a String

Open
#106 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
1.4k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

it looks like [`FilePath`](https://github.com/apple/swift-system/blob/1d5e35a460ebef822d61181b42a7354abaeb80c3/Sources/System/FilePath/FilePath.swift#L70) has a conformance to `Codable`, but this is a synthesized conformance, and expects a keyed container with a property called `_storage`.

i don’t know if this is intentional, but it doesn’t seem very useful. `FilePath` should just be `Decodable` from a `String`.

Contributor guide

Open the contributing guide

Research direction

Start in Sources/System/FilePath/FilePath.swift at the FilePath declaration and its Codable conformance. Check how the synthesized conformance handles storage and whether the project has tests covering Codable behavior. Done means FilePath can be decoded from a String while preserving the intended existing encoding behavior, with tests demonstrating the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.