Skip to content

`PackageGraph.computeTestTargetsForExecutableTargets() is incorrectly affected by plugin usage #5841

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 1 commit into from
Oct 27, 2022

Conversation

abertelrud
Copy link
Contributor

A target's use of a plugin is represented as a kind of dependency, but this should not influence the test association. Otherwise every test that depends on a library that uses a plugin seems to be associated with every other target that uses the plugin.

Motivation

This function is returning wrong results, causing tests of targets that use plugins to be incorrectly associated with other targets that use those same plugins.

Modifications

  • filter out plugin target dependencies
  • add a unit test

rdar://101564030

…s()` incorrectly returns test mappings for plugin usage targets)

A target's use of a plugin is represented as a kind of dependency, but this should not influence the test association.  Otherwise every test that depends on a library that uses a plugin seems to be associated with every other target that uses the plugin.
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

This one doesn't look directly related to this change:

'dyld: lazy symbol binding failed: can'\''t resolve symbol _$ss13_runAsyncMainyyyyYaKcF in /var/folders/pf/p5g2vb2j0yx1x6vlmxdppc700000gn/T/spm-tests-testPrebuildPluginShouldNotUseExecTarget.muvu8T/plugin-cache/X because dependent dylib /usr/lib/swift/libswift_Concurrency.dylib could not be loaded
dyld: can'\''t resolve symbol _$ss13_runAsyncMainyyyyYaKcF in /var/folders/pf/p5g2vb2j0yx1x6vlmxdppc700000gn/T/spm-tests-testPrebuildPluginShouldNotUseExecTarget.muvu8T/plugin-cache/X because dependent dylib /usr/lib/swift/libswift_Concurrency.dylib could not be loaded

@abertelrud
Copy link
Contributor Author

Seeing the same in all the PRs actually...

@neonichu
Copy link
Contributor

Probably same as rdar://problem/101582542, #5834 added some plugin tests that aren't guarded by supportsSwiftConcurrency

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test macos

@abertelrud abertelrud merged commit 8001413 into swiftlang:main Oct 27, 2022
@abertelrud abertelrud deleted the eng/fix-associated-tests branch October 27, 2022 02:03
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.

2 participants