Skip to content

Prepare SwiftParser for Library Evolution #1095

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
Nov 29, 2022
Merged

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Nov 29, 2022

  • Work around a SIL crash rdar://102247545
  • Rework the @_spi restrictions on TokenConsumer to avoid Library Evolution restrictions.

There appears to be an unhandled case where a _read accessor yields the result of an unsafe addressor. rdar://102247545 tracks the SIL-side problem. For now, swap the _read access for a plain getter.
When Library Evolution is enabled, this protocol requires its @_spi members to have default implementations. For one, there's not really a reasonable default implementation we could provide. For another, there's not really a way one could conform to this protocol without also having SPI access to raw tokens from the lexer. Lift the SPI restriction to the entire protocol and refactor the conformances a bit.
@CodaFi CodaFi requested review from rintaro and DougGregor November 29, 2022 17:06
@CodaFi CodaFi requested a review from ahoppen as a code owner November 29, 2022 17:06
@CodaFi
Copy link
Contributor Author

CodaFi commented Nov 29, 2022

@swift-ci test

@CodaFi CodaFi merged commit e8da930 into swiftlang:main Nov 29, 2022
@CodaFi CodaFi deleted the library-card branch November 29, 2022 19:53
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.

3 participants