swiftlang / swiftlang/swift-experimental-string-processing

Convert closure-based methods to typed throws

Open
#834 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
308
Forks
52
Avg merge
12h 45m
Merged PRs (30d)
2

Description

Several of the string/regex algorithms methods in the _StringProcessing module take throwing closures and are marked as rethrows. They should be converted to typed throws while maintaining the existing ABI.

In addition, trimPrefix was published marked as throws instead of rethrows, so that will need some additional consideration to avoid source breakage.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the _StringProcessing module and its string/regex algorithm methods that accept throwing closures, then review their existing ABI and rethrows declarations. Verify that the conversions preserve the existing ABI and source behavior, with particular attention to the published trimPrefix method and its throws declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
backend-api-design
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 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.