Skip to content

[sending] Fix issues when suppressing SendingArgsAndResults found when adding sending to Swift Concurrency #74044

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

Conversation

gottesmm
Copy link
Contributor

While working on adding sending to some APIs in the stdlib, I noticed these issues were showing up in the swift interface file produces for Concurrency.

This PR fixes all of the issues I found:

  1. The AST Printer if it wanted to print first a required feature and then a suppressible feature would drop compiler(>=5.3) from the inner suppressible check since it thought it wasn't necessary. The problem with doing this is that it ignores that compiler(>=5.3) has a second purpose. It causes the compiler to ignore parsing errors from the if block if the test fails. I added the compiler(>=5.3) check since I need that for sending and I think it is reasonable to not fail if we parse.
  2. I found that we were not properly suppression function typed fields of nominal types.
  3. I discovered that we did not properly detect sending in function parameters to initializers (i.e. we handled just FuncDecls instead of AbstractFunctionDecls).

rdar://129045783

gottesmm added 6 commits May 30, 2024 22:12
…ble features to guard against parser errors.

The code here was assuming that if we already emitted a compiler guard for
non-Suppressable features, we could avoid doing it for suppressable
features. The problem with this is that compiler() does more than just check for
compiler versions... it also tells the compiler that parser errors in the if
block should be ignored when if evaluates to false.

rdar://129045783
…NominalTypes.

These already worked... I am just adding the code coverage before I fix a
different issue in the next commit. This will make it clearer what I am actually
fixing in the next commit when one reads the tests.
… out an increasing ID for all suppressed statements.

I am using this to better test out suppression statements. I am finding that
FileCheck runs into issues with some of the '#if' lines I am trying to match. I
am able to use this option with my asserts only test to uniquely identify a '#if
...' statement and thus have the pattern matching work. I needed this to get the
test in the next commit to pass testing.
@gottesmm gottesmm force-pushed the pr-e9ee61c33e84d5df61764b06277a75cdfe3b58d0 branch from 79b334e to bfb5096 Compare May 31, 2024 05:23
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge May 31, 2024 05:23
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit 770b60a into swiftlang:main May 31, 2024
3 checks passed
@gottesmm gottesmm deleted the pr-e9ee61c33e84d5df61764b06277a75cdfe3b58d0 branch May 31, 2024 21:04
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