Skip to content

[ModulesGraph] Fix association between .tools targets and their pac… #7523

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
May 2, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 2, 2024

…kages

While inserting updated .tools targets to modulesToPackages the logic
should use the package where the target resides instead of the package where it's referenced.

Resolves: rdar://127369576

…kages

While inserting updated `.tools` targets to `modulesToPackages`
the logic should use the package where the target resides instead
of the package where it's referenced.

Resolves: rdar://127369576
@xedin
Copy link
Contributor Author

xedin commented May 2, 2024

@swift-ci please test

@@ -207,7 +207,8 @@ public struct ModulesGraph {
switch dependency {
case .target(let targetDependency, _):
allTargets.insert(targetDependency)
modulesToPackages[targetDependency.id] = package
modulesToPackages[targetDependency.id] =
identitiesToPackages[targetDependency.packageIdentity]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we change ResolvedModule and ResolvedProduct to reference ResolvedPackage instead of PackageIdentifier that should make modulesToPackages and productsToPackages obsolete...

@MaxDesiatov MaxDesiatov added bug cross-compilation modules graph Modules dependency resolution labels May 2, 2024
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Thank you!

@xedin xedin merged commit 35d3de2 into swiftlang:main May 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cross-compilation modules graph Modules dependency resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants