Skip to content

Organize discovered tests in a runner plan based on the module they're implemented in #1131

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stmontgomery
Copy link
Contributor

WIP

Motivation:

[Explain here the context, and why you're making that change. What is the problem you're trying to solve.]

Modifications:

[Describe the modifications you've done.]

Checklist:

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

rdar://147356925

@stmontgomery stmontgomery added this to the Swift 6.x milestone May 27, 2025
@stmontgomery stmontgomery self-assigned this May 27, 2025
@stmontgomery stmontgomery added bug 🪲 Something isn't working tools integration 🛠️ Integration of swift-testing into tools/IDEs discovery 🔎 test content discovery labels May 27, 2025
/// property on the ID of the containing suite will be the name of the
/// imported module, but the value of this property for the ID of the test
/// within that extension will be the name of the module which declares the
/// extension.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Danger! This is potentially ambiguous. We may want to instead describe such a test in terms of both modules.

@@ -123,6 +131,8 @@ extension Test: Identifiable {
var result = containingTypeInfo.map(ID.init)
?? ID(moduleName: sourceLocation.moduleName, nameComponents: [], sourceLocation: nil)

result.moduleName = sourceLocation.moduleName
Copy link
Contributor

@grynspan grynspan May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we store this value in a separate field (if it differs from the inferred module)? extensionModuleName: String? perhaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working discovery 🔎 test content discovery tools integration 🛠️ Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants