Skip to content

gracefully fail workspace state loading when duplicate entries found #3974

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
Jan 5, 2022

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Jan 5, 2022

motivation: some older versions of SwiftPM wrote duplicate entries into workspace-state.json which can cause a crash due to use of Dictionary::uniquingKeysWith

changes:

  • do not use Dictionary::uniquingKeysWith for non-santized input such as workspace state
  • add tests

rdar://86857825

motivation: some older versions of SwiftPM wrote duplicate entries into workspace-state.json which can cause a crash due to use of Dictionary::uniquingKeysWith

changes:
* do not use Dictionary::uniquingKeysWith for non-santized input such as workspace state
* add tests

rdar://86857825
@tomerd
Copy link
Contributor Author

tomerd commented Jan 5, 2022

@swift-ci please smoke test

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Jan 5, 2022
@tomerd tomerd merged commit 2112045 into swiftlang:main Jan 5, 2022
tomerd added a commit to tomerd/swift-package-manager that referenced this pull request Jan 5, 2022
…wiftlang#3974)

motivation: some older versions of SwiftPM wrote duplicate entries into workspace-state.json which can cause a crash due to use of Dictionary::uniquingKeysWith

changes:
* do not use Dictionary::uniquingKeysWith for non-santized input such as workspace state
* add tests

rdar://86857825
tomerd added a commit that referenced this pull request Jan 5, 2022
…3974) (#3976)

motivation: some older versions of SwiftPM wrote duplicate entries into workspace-state.json which can cause a crash due to use of Dictionary::uniquingKeysWith

changes:
* do not use Dictionary::uniquingKeysWith for non-santized input such as workspace state
* add tests

rdar://86857825
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants