Skip to content

Upstream: Use a new provider to wrap symbol graph extraction used for test discovery #1521

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

Merged
merged 2 commits into from
May 27, 2025

Conversation

luispadron
Copy link
Contributor

Upstreams:

Since symbol graph extraction is an implementation detail of swift_test, it shouldn't squat on the provider exclusively. Any other aspect invocation trying to extract symbol graphs on the same target will run into the "provider was provided twice" error.

To remedy this, introduce the ability for someone creating their own symbol graph aspect to automatically wrap the SwiftSymbolGraphInfo provider in one of their own choosing, and to add a distinguishing string to the output directory name so that outputs likewise don't collide. (In the future, we may want to do this automatically by hashing the active aspect IDs, but at this time I prefer not to introduce that complexity here.)

luispadron referenced this pull request May 27, 2025
PiperOrigin-RevId: 684460716
luispadron referenced this pull request May 27, 2025
…overy.

Since symbol graph extraction is an implementation detail of `swift_test`, it shouldn't squat on the provider exclusively. Any other aspect invocation trying to extract symbol graphs on the same target will run into the "provider was provided twice" error.

To remedy this, introduce the ability for someone creating their own symbol graph aspect to automatically wrap the `SwiftSymbolGraphInfo` provider in one of their own choosing, and to add a distinguishing string to the output directory name so that outputs likewise don't collide. (In the future, we may want to do this automatically by hashing the active aspect IDs, but at this time I prefer not to introduce that complexity here.)

PiperOrigin-RevId: 685710974
luispadron and others added 2 commits May 26, 2025 23:16
PiperOrigin-RevId: 684460716
…overy.

Since symbol graph extraction is an implementation detail of `swift_test`, it shouldn't squat on the provider exclusively. Any other aspect invocation trying to extract symbol graphs on the same target will run into the "provider was provided twice" error.

To remedy this, introduce the ability for someone creating their own symbol graph aspect to automatically wrap the `SwiftSymbolGraphInfo` provider in one of their own choosing, and to add a distinguishing string to the output directory name so that outputs likewise don't collide. (In the future, we may want to do this automatically by hashing the active aspect IDs, but at this time I prefer not to introduce that complexity here.)

PiperOrigin-RevId: 685710974
@luispadron luispadron force-pushed the luis/cp-be9220c-a2b9db5 branch from 5161aaa to c983b08 Compare May 27, 2025 03:17
@luispadron luispadron marked this pull request as ready for review May 27, 2025 03:17
@bazelbuild bazelbuild deleted a comment from google-cla bot May 27, 2025
@luispadron luispadron merged commit 46c6f7e into master May 27, 2025
12 checks passed
@luispadron luispadron deleted the luis/cp-be9220c-a2b9db5 branch May 27, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants