# ST-0020: Add a filePath property to SourceLocation

**URL:** <https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380>\
**Category:** Proposal Reviews\
**Tags:** swift-testing\
**Created:** [January 26, 2026, 11:21pm UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380 "2026-01-26T23:21:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![younata](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/younata/32/34709_2.png) [@younata](https://forums.swift.org/u/younata)\
**Post date:** [January 26, 2026, 11:21pm UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/1 "2026-01-26T23:21:07Z")

</div>

Hello Swift Community!

The review of ST-0020 “Add a `filePath` property to `SourceLocation`” begins now and runs through Monday February 09, 2026. The proposal is available here: [swift-evolution/proposals/testing/0020-sourcelocation-filepath.md at main · swiftlang/swift-evolution · GitHub](https://github.com/swiftlang/swift-evolution/blob/main/proposals/testing/0020-sourcelocation-filepath.md)

Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to the review manager. When messaging the review manager directly, please keep the proposal link at the top of the message.

## Trying it out

To try this feature out, add a dependency to the `main` branch of the `swift-testing` repo to your project:

```swift
...
dependencies: [
  ...
  .package(
    url: "https://github.com/swiftlang/swift-testing.git",
    branch: "main"
  ),
]
Then, add a target dependency to your test target:

.testTarget(
  ...
  dependencies: [
    ...
    .product(name: "Testing", package: "swift-testing"),
  ]
)

```

Finally, import Swift Testing using `@_spi(Experimental) import Testing`

## What goes into a review?

The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:

- What is your evaluation of the proposal?
- Is the problem being addressed significant enough to warrant a change to Swift?
- Does this proposal fit well with the feel and direction of Swift?
- If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
- How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

More information about the Swift evolution process is available at [swift-evolution/process.md at main · swiftlang/swift-evolution · GitHub](https://github.com/swiftlang/swift-evolution/blob/main/process.md)

Thank you for contributing to Swift!

Rachel Brindle

Review Manager

---

<div class="post-metadata">

**Author:** ![gwynne](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gwynne/32/24337_2.png) [@gwynne](https://forums.swift.org/u/gwynne)\
**Post date:** [January 27, 2026, 12:20am UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/2 "2026-01-27T00:20:26Z")

</div>

By my lights, this is such a no-brainer it’s downright silly that it even needs to go through the evolution process. Huge +1 🙂

---

<div class="post-metadata">

**Author:** ![Mordil](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mordil/32/5840_2.png) [@Mordil](https://forums.swift.org/u/Mordil)\
**Post date:** [January 27, 2026, 12:50am UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/3 "2026-01-27T00:50:24Z")

</div>

Absolutely no brainer. Let’s expose this information to tooling.

---

<div class="post-metadata">

**Author:** ![grynspan](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/grynspan/32/15315_2.png) [@grynspan](https://forums.swift.org/u/grynspan)\
**Post date:** [January 27, 2026, 1:10am UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/4 "2026-01-27T01:10:42Z")

</div>

Them's the rules!

---

<div class="post-metadata">

**Author:** ![Joseph\_Heck](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/joseph_heck/32/22369_2.png) [@Joseph\_Heck](https://forums.swift.org/u/Joseph_Heck)\
**Post date:** [January 27, 2026, 4:44pm UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/5 "2026-01-27T16:44:30Z")

</div>

Yes, please. Clearly valuable.

---

<div class="post-metadata">

**Author:** ![maartene](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/maartene/32/42076_2.png) [@maartene](https://forums.swift.org/u/maartene)\
**Post date:** [February 4, 2026, 10:00am UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/6 "2026-02-04T10:00:44Z")

</div>

Good idea!

---

<div class="post-metadata">

**Author:** ![younata](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/younata/32/34709_2.png) [@younata](https://forums.swift.org/u/younata)\
**Post date:** [February 10, 2026, 8:43pm UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/7 "2026-02-10T20:43:17Z")

</div>

This proposal has been [accepted](https://forums.swift.org/t/accepted-st-0020-add-a-filepath-property-to-sourcelocation/84664)! Thanks everyone for participating and leaving your feedback!

---

<div class="post-metadata">

**Author:** ![John\_McCall](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/john_mccall/32/1351_2.png) [@John\_McCall](https://forums.swift.org/u/John_McCall)\
**Post date:** [February 10, 2026, 8:50pm UTC](https://forums.swift.org/t/st-0020-add-a-filepath-property-to-sourcelocation/84380/8 "2026-02-10T20:50:19Z")

</div>

Closed on February 10, 2026, 8:50pm UTC


