[pigeon] Fix Object arguments in Swift and C++#3020
[pigeon] Fix Object arguments in Swift and C++#3020stuartmorgan-g merged 12 commits intoflutter:mainfrom
Conversation
|
(I haven't run all of the new integration tests locally yet, so something may well fail due to a typo in a host implementation or something.) |
|
@stuartmorgan seems like you did break a couple tests |
|
I think it'll all pass now. Kotlin was just a copypasta mistake, but C++ I was missing part of the fix since I forgot that (I'm pretty sure that |
| expect( | ||
| code, | ||
| contains( | ||
| 'const auto* a_generic_object_arg = &encodable_a_generic_object_arg;')); |
There was a problem hiding this comment.
These new unit tests aren't strictly necessary, since it was already failing compilation, but since we have this suite of extraction format tests already I thought it would be useful to include them to have fast-test coverage of this special case.
|
Landing on red to green the tree; I'm not sure what's going on since all the individual tests show green, but the overall status still shows red. |
Fixes a warning in generated Swift output when an argument is of type
Object. This is blocking flutter/plugins#6914 since we check our macOS and iOS plugin code for warnings in CI.Rather than add a Dart generator unit test for this one specific case, I tightened the Swift compilation settings for our test plugin to treat warnings as errors (per flutter/flutter#59116 (comment)) to catch the entire class of errors, and added
echo*variants for Object to make sure this one then showed up.Incidental fixes:
Object?, which we'd never noticed because we weren't analyzing any generated code that returningObjectorObject?before.Objectin the C++ generator, causing it to throw. I'm not sure this is the output I'll keep for C++ (thus the TODO), but it's the simple fix to make it work at all.Fixes flutter/flutter#117994
Part of flutter/flutter#59116
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.