-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
Just trying to be standardized about this.
…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.
@swift-ci smoke test |
hborla
reviewed
Jul 31, 2024
@swift-ci smoke test |
4aadede
to
6f0d3cb
Compare
@swift-ci smoke test |
6f0d3cb
to
0f61f29
Compare
@swift-ci smoke test |
linux failure is unrelated. |
@swift-ci smoke test linux platform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.