Skip to content

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Sep 17, 2025

6.2 cherry-pick of #671

  • Explanation: Limits the platform filtering check we do for the index build to only apply to the workspace build description, ensuring that we don't incorrectly exclude host build tools for the target and package descriptions.
  • Scope: Affects index build descriptions
  • Issue: rdar://160798093
  • Risk: Low, only affects index build descriptions, and relaxes the filtering logic such that it more closely matches what we do for a regular build
  • Testing: Added tests to test suite
  • Reviewer: Ben Barham, Owen Voorhees

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

@swift-ci please test

@hamishknight hamishknight merged commit 3144d7b into swiftlang:release/6.2 Sep 18, 2025
3 checks passed
@hamishknight hamishknight deleted the desc-golf-6.2 branch September 18, 2025 09:20
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