Skip to content
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

[Pigeon] Condenses serialization formats #2745

Merged
merged 72 commits into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
524af57
Fixs missed indents on generated comments
tarrinneal Oct 25, 2022
39b10a5
begin improved serialization
tarrinneal Oct 25, 2022
cdaecf9
formatting errors
tarrinneal Oct 25, 2022
a4510d5
Dart encoder updated to use lists, tests to match
tarrinneal Oct 27, 2022
eca71a2
Begin swift serial, change error shape
tarrinneal Nov 2, 2022
d439f90
update tests for swift and dart
tarrinneal Nov 4, 2022
ae34fd4
true > false
tarrinneal Nov 5, 2022
c1f3f22
Return to Object
tarrinneal Nov 5, 2022
f8cd1c1
correctly nest lists in dart and tests
tarrinneal Nov 5, 2022
c415c4c
Kotlin gen and tests updated to lists
tarrinneal Nov 7, 2022
5168014
Java and Tests updated to new serials
tarrinneal Nov 11, 2022
340f967
Merge branch 'main' of github.com:flutter/packages
tarrinneal Nov 12, 2022
b5340e9
Stuart check this pr (start of objc changes)
tarrinneal Nov 16, 2022
38232cd
obj c tests for serial
tarrinneal Nov 17, 2022
980a72a
update unit tests to match new generated outputs
tarrinneal Nov 17, 2022
899732d
finish objc tests
tarrinneal Nov 18, 2022
71b5330
More kt tests
tarrinneal Nov 23, 2022
c755b4a
c++ generator and unit tests
tarrinneal Nov 23, 2022
85b53d4
Merge branch 'main' of github.com:flutter/packages
tarrinneal Nov 23, 2022
e6b2552
analyze, format, changelog
tarrinneal Nov 23, 2022
f785b16
test file updates for ci
tarrinneal Nov 23, 2022
300dae6
format and analyze again
tarrinneal Nov 23, 2022
0c73933
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Nov 23, 2022
b4003b0
a few more test generated files
tarrinneal Nov 24, 2022
eb43268
Partial Windows fixes
stuartmorgan Nov 27, 2022
0b498cc
null field tests c++
tarrinneal Nov 29, 2022
9fe0ef0
merge main
tarrinneal Nov 29, 2022
dd40057
format
tarrinneal Nov 29, 2022
888c7bc
fix merge issue with broken test
tarrinneal Nov 29, 2022
7547df5
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Nov 30, 2022
60aa9fe
remove unneeded wrapping
tarrinneal Nov 30, 2022
8859079
Merge branch 'main'
tarrinneal Nov 30, 2022
bee1047
generated files
tarrinneal Nov 30, 2022
aa722ad
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 1, 2022
1e12317
fix some formatting errors
tarrinneal Dec 1, 2022
3245d77
Merge branch 'main' needs regenerated files still
tarrinneal Dec 1, 2022
b2eb193
format
tarrinneal Dec 1, 2022
6cc4cd0
Merge branch 'main'
tarrinneal Dec 1, 2022
f4e9201
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 3, 2022
b54362b
more gen files
tarrinneal Dec 3, 2022
f9c8237
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 8, 2022
799d56d
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 8, 2022
84a83c0
gen files
tarrinneal Dec 8, 2022
23221fe
generator reviews pt1
tarrinneal Dec 9, 2022
01e2072
test fixes pt1
tarrinneal Dec 9, 2022
d579798
fixed nits and nil issues with objc
tarrinneal Dec 12, 2022
0a34031
better fix for objc null classes
tarrinneal Dec 12, 2022
8b11d20
fix doc comment
tarrinneal Dec 12, 2022
b29a0b7
unit test updates
tarrinneal Dec 12, 2022
a01e819
format
tarrinneal Dec 12, 2022
bf0af6c
some c++ fixes
tarrinneal Dec 12, 2022
7cbb9b8
typo
tarrinneal Dec 12, 2022
dfc12e4
format
tarrinneal Dec 12, 2022
f36ebd1
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 12, 2022
9bfe05e
Some nits and such
tarrinneal Dec 13, 2022
2bf4593
comment
tarrinneal Dec 13, 2022
1af4f27
remove deleted files
tarrinneal Dec 13, 2022
9b4bbcc
c++ nits
tarrinneal Dec 13, 2022
6c782fa
objc nits
tarrinneal Dec 13, 2022
4b77db9
all but one c++ bug
tarrinneal Dec 13, 2022
8a6fd34
Merge branch 'serialization' of https://github.com/tarrinneal/package…
tarrinneal Dec 13, 2022
f081333
init all fields
tarrinneal Dec 13, 2022
9b7c24a
start of documenting data shape
tarrinneal Dec 13, 2022
8c3f1ed
nits and error handling
tarrinneal Dec 14, 2022
aa36dc8
more nits and such
tarrinneal Dec 15, 2022
9174253
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 15, 2022
221d864
bug?
tarrinneal Dec 15, 2022
09e0eef
references
tarrinneal Dec 15, 2022
8b706d1
const
tarrinneal Dec 15, 2022
4679325
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 16, 2022
40feac3
new null for larger alltypes
tarrinneal Dec 16, 2022
80a0346
Merge branch 'main' of github.com:flutter/packages into serialization
tarrinneal Dec 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update unit tests to match new generated outputs
  • Loading branch information
tarrinneal committed Nov 17, 2022
commit 980a72a5cab4729e020e956d4ef4d7468f0d5b96
6 changes: 3 additions & 3 deletions packages/pigeon/test/kotlin_generator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ void main() {
expect(code, contains('''
if (api != null) {
channel.setMessageHandler { message, reply ->
val wrapped = hashMapOf<String, Any?>()
val wrapped = mutableListOf<Any?>()
try {
val args = message as List<Any?>
val inputArg = args[0] as Input
wrapped["result"] = api.doSomething(inputArg)
wrapped.add(api.doSomething(inputArg))
} catch (exception: Error) {
wrapped["error"] = wrapError(exception)
wrapped.add(wrapError(exception))
}
reply.reply(wrapped)
}
Expand Down
17 changes: 8 additions & 9 deletions packages/pigeon/test/objc_generator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ void main() {
final String code = sink.toString();
expect(code, contains('#import "foo.h"'));
expect(code, contains('@implementation Foobar'));
expect(
code,
contains(
'pigeonResult.enum1 = [GetNullableObject(dict, @"enum1") integerValue];'));
expect(code, contains('pigeonResult.enum1 = [list[1] integerValue];'));
});

test('primitive enum host', () {
Expand Down Expand Up @@ -347,8 +344,7 @@ void main() {
generateObjcSource(const ObjcOptions(header: 'foo.h'), root, sink);
final String code = sink.toString();
expect(code, contains('@implementation Foobar'));
expect(code,
contains('pigeonResult.aBool = GetNullableObject(dict, @"aBool");'));
tarrinneal marked this conversation as resolved.
Show resolved Hide resolved
expect(code, contains('pigeonResult.aBool = list[0];'));
});

test('nested class header', () {
Expand Down Expand Up @@ -390,8 +386,11 @@ void main() {
expect(
code,
contains(
'pigeonResult.nested = [Input nullableFromMap:GetNullableObject(dict, @"nested")];'));
expect(code, matches('[self.nested toMap].*@"nested"'));
'pigeonResult.nested = [Input fromList:[list objectAtIndex:0 ]];'));
expect(
code,
contains(
'[list addObject:(self.nested ? [self.nested toList] : [NSNull null])]'));
});

test('prefix class header', () {
Expand Down Expand Up @@ -489,7 +488,7 @@ void main() {
final StringBuffer sink = StringBuffer();
generateObjcSource(const ObjcOptions(prefix: 'ABC'), root, sink);
final String code = sink.toString();
expect(code, contains('ABCInput fromMap'));
expect(code, contains('ABCInput fromList'));
expect(code, matches(r'ABCInput.*=.*args.*0.*\;'));
expect(code, contains('void ABCApiSetup('));
});
Expand Down