Skip to content
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

Split .bug() into two taking a URL or a number. #401

Merged
merged 1 commit into from
May 24, 2024

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
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
Copy link
Contributor Author

Windows failure is a known compiler issue.

@grynspan grynspan merged commit 0c2fa99 into main May 24, 2024
2 of 3 checks passed
@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.

None yet

2 participants