Skip to content

[region-isolation] Improve errors around strong transferring and wordsmith main error #71823

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 13 commits into from
Feb 23, 2024

Conversation

gottesmm
Copy link
Contributor

This series of commits:

  1. Improves the diagnostics around strong transferring and wordsmiths the main transferring error to be smaller.
  2. Adds a bunch more support in VariableNameInference for inferring more variable names.
  3. Eliminates most of the call site passes self error. Still a little more to do, but this hits most of them.

…e is next to the routines that use the utility.

NFC.

Before this commit, the diagnostic emission was split into utilities that were
used by one large emitter class. This could get confusing since there was some
duplication of names in between the utilities. Now instead, each part of the
main diagnostic emitter is in the MARK: section of the utilities that it uses.

Just making the pass easier for me to reason about.
…essary.

Just simplifying code. I also deleted dead code as well.
…ansfer non transferrable error.

Preparing for beginning to emit named errors where I need this information. This
just lets me do it before that other commit to make it cleaner.

NFC.
I just did a full pass through. There were some cases around nonisolated
closures defined in methods and global actor isolated things where we are now
emitting the wrong message. I am going to fix that in subsequent commits.
…uld,may} cause a race"

As I was updating tests in the previous commit, I noticed that this would read better to me.
…nfer name/root from value.

This just cleans up the code by not exposing the details from the
VariableNameInferrer outside of the utilities. It also makes it easier to write
conditional code that uses these helpers by returning an optional, so instead of
having a long setup + an if statement, we just have an if statement optional
check.
…ssigned into a different transferring parameter.

Just eliminating another "call site passes `self`" error.
…mit better diagnostics given the new support I added for VariableNameInference.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit a703f22 into swiftlang:main Feb 23, 2024
@gottesmm gottesmm deleted the strong_transferring branch February 23, 2024 01:03
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.

1 participant