Skip to content

[Serialization] Add warning when .swiftsourceinfo is malformed #37237

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 6, 2021

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented May 4, 2021

Cherry-pick #37196:

Output a warning rather than ignoring a malformed .swiftsourceinfo
completely.

Resolves rdar://77350048

Output a warning rather than ignoring a malformed .swiftsourceinfo
completely.

Resolves rdar://77350048
@bnbarham bnbarham added the r5.5 label May 4, 2021
@bnbarham bnbarham requested a review from akyrtzi May 4, 2021 06:20
@bnbarham bnbarham requested a review from a team as a code owner May 4, 2021 06:20
@bnbarham
Copy link
Contributor Author

bnbarham commented May 4, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented May 4, 2021

Build failed
Swift Test Linux Platform
Git Sha - e9728bd

@swift-ci
Copy link
Contributor

swift-ci commented May 4, 2021

Build failed
Swift Test OS X Platform
Git Sha - e9728bd

@bnbarham
Copy link
Contributor Author

bnbarham commented May 4, 2021

The change to remove ignoring .swiftsourceinfo by default wasn't in 5.5 yet, it is now.

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented May 4, 2021

Build failed
Swift Test OS X Platform
Git Sha - e9728bd

@bnbarham
Copy link
Contributor Author

bnbarham commented May 4, 2021

Unrelated failure, looks like it should be fixed now

@swift-ci please test macOS platform

@bnbarham
Copy link
Contributor Author

bnbarham commented May 4, 2021

Looks like the Windows failure is fixed now too.

@swift-ci please test Windows platform

@bnbarham
Copy link
Contributor Author

bnbarham commented May 4, 2021

@swift-ci please nominate

--- CCC ---

Explanation: Outputs a warning when reading a malformed .swiftsourceinfo, rather than completely ignoring it. The most common case would be an old version. Even this would be unusual as the .swiftmodule would normally be out-of-date as well, causing both to be rebuilt. In case this does happen, however, this warning will help with diagnosing stale data in SourceKit responses.

Radar/SR Issue: rdar://77350048

Risk: Very minimal. At most there's a risk of a spuriously outputting the new diagnostic warning.

Testing: Added a test case for loading invalid .swiftsourceinfo files.

@swift-ci
Copy link
Contributor

swift-ci commented May 5, 2021

Build failed
Swift Test OS X Platform
Git Sha - e9728bd

@bnbarham
Copy link
Contributor Author

bnbarham commented May 5, 2021

Still unrelated

@swift-ci please test macOS platform

@bnbarham bnbarham merged commit cb26838 into swiftlang:release/5.5 May 6, 2021
@bnbarham bnbarham deleted the cherry-rdar77350048 branch May 6, 2021 22:24
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants