Skip to content

Clean up warnings, fix handling of dep version changes #8232

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 2 commits into from
Jan 22, 2025

Conversation

dschaefer2
Copy link
Member

Assume dependent products from prebuilts are being used.

Assume dependent products from prebuilts are being used.
xedin
xedin previously approved these changes Jan 20, 2025
@@ -352,9 +358,11 @@ private func checkAllDependenciesAreUsed(
let usedByPackage = productDependencies.contains { $0.name == product.name }
// We check if any of the products of this dependency is guarded by a trait.
let traitGuarded = traitGuardedProductDependencies.contains(product.name)
// Consider prebuilts as used
let prebuilt = prebuilts[dependency.identity]?.keys.contains(product.name) ?? false

// If the product is either used directly or guarded by a trait we consider it as used
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this comment has to be updated as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just removed that comment. It's redundant.

Copy link
Contributor

@bkhouri bkhouri left a comment

Choose a reason for hiding this comment

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

thought (possibly-blocking): It's great we are eliminating a warning, but would it be possible to add an automated test to ensure we do not regress, and to also gain confidence the changes fix the underlying issue?

@dschaefer2
Copy link
Member Author

thought (possibly-blocking): It's great we are eliminating a warning, but would it be possible to add an automated test to ensure we do not regress, and to also gain confidence the changes fix the underlying issue?

That's what the change in PrebuiltsTest does.

@dschaefer2
Copy link
Member Author

I'm going to lump this in with another bigger change coming to fix a serious bug.

Found a bug where if you change swift syntax version in your
manifest, we were not changing the use of prebuilts to match.
This adds a scan to do so. Also requires that we add the version
of the prebuilt to the workspace state.
@dschaefer2 dschaefer2 changed the title Eliminate the warning that swift-syntax isn't being used. Clean up warnings, fix handling of dep version changes Jan 21, 2025
@dschaefer2
Copy link
Member Author

I found a bug where if you change swift syntax version in your manifest, we were not changing the use of prebuilts to match. I have added a scan to do so. Also requires that we add the version of the prebuilt to the workspace state.

@dschaefer2 dschaefer2 requested a review from xedin January 21, 2025 21:37
@dschaefer2 dschaefer2 dismissed xedin’s stale review January 21, 2025 21:38

Code has changed a lot so needs a new review.

@dschaefer2 dschaefer2 merged commit 6c95780 into swiftlang:release/6.1 Jan 22, 2025
5 checks passed
@dschaefer2 dschaefer2 deleted the prebuilts-no-warnings branch January 22, 2025 05:18
dschaefer2 added a commit to dschaefer2/swift-package-manager that referenced this pull request Jan 23, 2025
I found a bug where if you change swift syntax version in your manifest, we were not changing the use of prebuilts to match. I have added a scan to do so. Also requires that we add the version of the prebuilt to the workspace state. Assume dependent products from prebuilts are being used to remove the warning for swift-syntax.
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.

4 participants