Skip to content

Conversation

@grynspan
Copy link
Contributor

@grynspan grynspan commented May 6, 2024

This PR changes the initializers for .bug() from ones taking an undecorated and unspecified "identifier" to ones taking either a URL (as a string) or a numeric ID ("bug number.")

The existing interface is ambiguous to tools authors seeking to integrate with it. They must treat every bug as potentially containing a URL with fallback paths if a bug's ID cannot be parsed as a URL. By splitting URLs and numbers up into two separate properties, tools authors can provide reliable, distinct interfaces for bugs known by number vs. those known by URL.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@grynspan grynspan added bug 🪲 Something isn't working enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs public-api Affects public API labels May 6, 2024
@grynspan grynspan self-assigned this May 6, 2024
@grynspan
Copy link
Contributor Author

grynspan commented May 6, 2024

@swift-ci please test

@grynspan grynspan force-pushed the jgrynspan/refactor-bug-trait branch from bcf900f to 916b815 Compare May 13, 2024 16:58
@grynspan grynspan force-pushed the jgrynspan/refactor-bug-trait branch from 916b815 to 93603ae Compare May 23, 2024 19:41
@grynspan grynspan force-pushed the jgrynspan/refactor-bug-trait branch from 93603ae to 106764a Compare May 24, 2024 13:45
@grynspan grynspan marked this pull request as ready for review May 24, 2024 19:19
This PR changes the initializers for `.bug()` from ones taking an undecorated
and unspecified "identifier" to ones taking either a URL (as a string) or a
numeric ID ("bug number.")

The existing interface is ambiguous to tools authors seeking to integrate with
it. They must treat _every_ bug as potentially containing a URL with fallback
paths if a bug's ID cannot be parsed as a URL. By splitting URLs and numbers up
into two separate properties, tools authors can provide reliable, distinct
interfaces for bugs known by number vs. those known by URL.
@grynspan grynspan force-pushed the jgrynspan/refactor-bug-trait branch from 106764a to a7ea40f Compare May 24, 2024 19:20
@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan grynspan requested a review from stmontgomery May 24, 2024 19:21
@grynspan grynspan requested a review from stmontgomery May 24, 2024 19:24
@grynspan
Copy link
Contributor Author

Windows failure is a known compiler issue.

@grynspan grynspan merged commit 0c2fa99 into main May 24, 2024
@grynspan grynspan deleted the jgrynspan/refactor-bug-trait branch May 24, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🪲 Something isn't working enhancement New feature or request public-api Affects public API tools integration 🛠️ Integration of swift-testing into tools/IDEs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants