Skip to content
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

[6.1] Use the new SwiftPM API to load the build plan #1981

Open
wants to merge 4 commits into
base: release/6.1
Choose a base branch
from

Conversation

bnbarham
Copy link
Contributor

  • Explanation: The build graph will not contain generated source without building and running the plugins. Rather than loading it ourselves, let SwiftPM do so with a new API (which does build and run the plugins).
  • Scope: Settings when background indexing is enabled for SwiftPM projects
  • Issue: rdar://102242345 and rdar://144557689
  • Original PR: Use the new SwiftPM API to load the build plan #1973
  • Risk: Medium - the main risk here is that our in-memory build interacts problematically with the one from our swift build invocations. I haven't seen this in manual testing, though we do rebuild the plugins on launch. Fixing the lack of generated sources is worth this risk.
  • Testing: Added plugin tests
  • Reviewer: @ahoppen

@bnbarham bnbarham requested a review from ahoppen as a code owner February 14, 2025 22:34
@bnbarham
Copy link
Contributor Author

We previously skipped building/running tool plugins here, which meant
that the compiler arguments for a target also missed any generated
sources. Use the new `BuildDescription.load` API from SwiftPM to address
this.

Resolves rdar://102242345.

(cherry picked from commit f525da5)
(cherry picked from commit 751eb61)
@bnbarham bnbarham force-pushed the 6.1-generated-source-should-work branch from 0a96f1e to 7e020bc Compare February 17, 2025 17:46
@bnbarham
Copy link
Contributor Author

@bnbarham
Copy link
Contributor Author

swiftlang/swift-package-manager#8296

@swift-ci please test Windows platform

ahoppen and others added 2 commits February 17, 2025 19:17
This *shouldn't* be needed, but allows running plugins to be skipped if
there's any unexpected interactions with background indexing.

(cherry picked from commit a534385)
@bnbarham bnbarham force-pushed the 6.1-generated-source-should-work branch from 7e020bc to c065093 Compare February 18, 2025 03:17
@bnbarham
Copy link
Contributor Author

@bnbarham
Copy link
Contributor Author

swiftlang/swift-package-manager#8296

@swift-ci please test Windows platform

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