[6.2] Only check isTargetSuitableForPlatformForIndex for workspace description#803
Merged
Merged
Conversation
Factor out the creation of the common package dependencies between these two tests.
Use Swift Testing parameterization to test different run destinations.
This better matches what we actually generate for packages. Also set all available platforms as supported.
This exposes the issue where `isTargetSuitableForPlatformForIndex` returns `false` in the target and package build. Also change `testHostToolsAndDependenciesAreBuiltDuringIndexingPreparationForPackage` to use a dependency package and test both the target and package build descriptions.
…ption For the package and target build description we can end up incorrectly dropping build tool dependencies since not all clients pass in the correct dependency information. It's not clear that we actually gain much from doing this check for the target and package build descriptions though, its primary purpose is to avoid configuring unsupported targets in the workspace build description where we try to configure for all available platforms. As such, switch to only checking for the workspace build description. Note we don't encounter this issue in the workspace case since there we override the build parameters for host build tools to always build for the host platform. rdar://152012769
This gets applied pretty inconsistently, only 1 client actually passes the correct dependency information. We ought to be able to rely on the host platform being imposed for the workspace build description, so it shouldn't be necessary.
Contributor
Author
|
@swift-ci please test |
owenv
approved these changes
Sep 18, 2025
jakepetroules
approved these changes
Sep 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
6.2 cherry-pick of #671