Skip to content

[region-isolation] Incremental diagnostic updates #75597

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 11 commits into from
Aug 2, 2024

Conversation

gottesmm
Copy link
Contributor

Just doing a little development on main of the diagnostics as I change them. This just makes it easier to keep other patches in sync with this work.

gottesmm added 9 commits July 31, 2024 13:10
…solationInfo::getWithIsolationCrossing().

The reason that I am changing this code is that getWithIsolationCrossing is a
bad API that was being used to infer actor isolation straight from an ApplyExpr
without adding an actor instance. This can cause us to reject programs
unnecessarily if we in other parts of the code correctly infer the SILValue
actor instance for the isolation.

Rather than allow for that, I am removing this code and I improved the rest of
the pattern matching here to ensure that we handled that with the normal actor
instance inferring code. This will prevent this type of mismerge from happening
by mistake. I fixed up the changes in the test cases.

The only usage of this left is for ApplyIsolationCrossings parsed straight from
SIL that we use only when testing. This is safe since if a test writer is using
the parsed SIL in this manner, they can make sure that mismerges do not happen.
… emit typed diagnostics instead of named diagnostics.

We only use typed diagnostics if we are unable to pattern match a name for a
SILValue. Since we generally do this (in most of our tests we do for instance),
it is hard to test this. So I put in an option here that is enabled only in
asserts that forces the diagnostic emitter to emit the typed diagnostic by
forcing a name inference failure. This then allows me to write an asserts only
test that validates the behavior of the typed diagnostics since I can guarantee
the typed diagnostics will run.
…r error to the split small error/large note format we are standardizing on.

I also cleaned up the diagnostic a little bit.
…or to use a new form of error.

NOTE: To make testing these easier (since they are fallback paths), I
added an option that disables named errors only for use in asserts.
…ostic into a short error, longer note diagnostic.

Just finishing these diagnostics.
…or passing never sendable types as a sending parameter.
…e a new short-error, long-note form error.

I also messed with the text a little bit.

This eliminates the last of the old style diagnostics.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge July 31, 2024 20:10
@gottesmm gottesmm disabled auto-merge July 31, 2024 20:19
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge July 31, 2024 21:22
@gottesmm gottesmm disabled auto-merge July 31, 2024 21:22
@gottesmm gottesmm force-pushed the incremental-diagnostics branch from 4aadede to 6f0d3cb Compare July 31, 2024 22:42
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm force-pushed the incremental-diagnostics branch from 6f0d3cb to 0f61f29 Compare August 1, 2024 20:57
@gottesmm
Copy link
Contributor Author

gottesmm commented Aug 1, 2024

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

gottesmm commented Aug 2, 2024

linux failure is unrelated.

@gottesmm
Copy link
Contributor Author

gottesmm commented Aug 2, 2024

@swift-ci smoke test linux platform

@gottesmm gottesmm enabled auto-merge August 2, 2024 19:08
@gottesmm gottesmm merged commit 9c4da1f into swiftlang:main Aug 2, 2024
3 checks passed
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.

2 participants