Commit graph

485 commits

Author SHA1 Message Date
Jesse Wilson
62e6363914
Merge pull request #534 from square/jwilson.0514.yield
Change the Kotlin reflection adapter to yield to the codegen adapter
2018-05-14 21:46:26 -04:00
Jesse Wilson
dd84b9f8f8 Change the Kotlin reflection adapter to yield to the codegen adapter 2018-05-14 21:07:46 -04:00
Jesse Wilson
3f1e4b5a3d
Merge pull request #533 from square/jwilson.0514.kotlin_reflect
Move Kotlin reflection into a kotlin/reflect directory
2018-05-14 18:03:10 -04:00
Jesse Wilson
60cb608956 Move Kotlin reflection into a kotlin/reflect directory
The maven coordinates stay the same.
2018-05-14 17:28:28 -04:00
Jesse Wilson
a0df085b81
Merge pull request #532 from square/jwilson.0514.move_kompiler
Move the Kotlin code generator to the kotlin/ module
2018-05-14 16:36:34 -04:00
Jesse Wilson
9f69029ef0 Move the Kotlin code generator to the kotlin/ module 2018-05-14 16:29:52 -04:00
Jesse Wilson
c5c4cac6c3
Merge pull request #531 from square/jwilson.0513.track_test_cases
Finish migrating tests from the reflective adapter
2018-05-14 12:10:33 -04:00
Jesse Wilson
13952c5430 Finish migrating tests from the reflective adapter 2018-05-13 21:52:06 -04:00
Zac Sweers
298aff24f5 Fix nullability not being preserved and clean up from shadowed names (#529)
* Add helper TypeName.asNullableIf extension

* Add missing nullability preservers to TypeResolver

* Fix shadowed names and add more missing nullable stuff
2018-05-13 14:38:02 -04:00
Jesse Wilson
986cc4c794 [maven-release-plugin] prepare for next development iteration 2018-05-06 21:50:45 -04:00
Jesse Wilson
c2f890879c [maven-release-plugin] prepare release moshi-parent-1.6.0-RC1 2018-05-06 21:50:39 -04:00
Jesse Wilson
1407ca4392 Update changelog for forthcoming release 2018-05-06 21:48:28 -04:00
Jesse Wilson
7b1177adbc
Merge pull request #503 from square/eric.write-from-source
Allow writing out raw JSON.
2018-05-06 21:11:34 -04:00
Jesse Wilson
c39fc12729
Merge pull request #523 from hzsweers/z/nonNullTypeVariabels
Fix nullable properties of TypeVariable types
2018-05-06 21:10:38 -04:00
Zac Sweers
4b610329bd Full JsonQualifier support in kotlin codegen. 2018-05-06 21:09:28 -04:00
Zac Sweers
54aca07ca1 Fix nullable properties of TypeVariable types
We were forgetting to apply the property's nullability to the resolved type.

Fixes #521
2018-05-04 13:29:50 -07:00
Jesse Wilson
10a5dc827b
Merge pull request #524 from square/jwilson.0504.green_green
Fix some tests that have the wrong expected exception message
2018-05-04 15:49:16 -04:00
Jesse Wilson
c35e3a1550 Fix some tests that have the wrong expected exception message
The message got improved in a conflicting change to these tests being added.
2018-05-04 15:39:55 -04:00
Jesse Wilson
eb24a23568
Merge pull request #511 from square/eric.non-null
Fix error message for assigning to non-null properties.
2018-05-04 15:06:35 -04:00
Jesse Wilson
98c4358615
Merge pull request #519 from square/eric.kotlin-path
Fix path for non-null value message.
2018-05-04 14:31:39 -04:00
Jesse Wilson
bb2705128c
Merge pull request #520 from square/eric.skipName
Add JsonReader.skipName.
2018-05-04 14:14:00 -04:00
Eric Cochran
b848f1cc52 Add JsonReader.skipName. 2018-04-30 18:41:18 -07:00
Eric Cochran
dfaf3405b2 Fix path for non-null value message. 2018-04-30 18:18:34 -07:00
Eric Cochran
a0cd8a4fc0 Allow writing out raw JSON. 2018-04-29 23:49:47 -07:00
Jesse Wilson
7018cec47d
Merge pull request #516 from hzsweers/z/metadata14
Update to kotlin-metadata 1.4 and use shaded compiler
2018-04-29 20:45:20 -04:00
Zac Sweers
d195203865 Update to kotlin-metadata 1.4 and use shaded compiler
Per https://github.com/Takhion/kotlin-metadata/releases/tag/v1.4.0

Now the compiler is shaded and not prone to breaking on kotlin updates, making it more robust until Jetbrains releases an official API for reading metadata.
2018-04-28 20:30:30 -07:00
Jesse Wilson
b96397f6eb
Merge pull request #500 from square/eric.coherent-nesting-problem-error-message
Add coherent error message for uneconded map keys.
2018-04-28 21:14:45 -04:00
Jake Wharton
4f3f74f016
Merge pull request #515 from square/eric.versions
Group dependency version codes together.
2018-04-27 10:27:41 -04:00
Jake Wharton
16fd551176
Merge pull request #513 from square/eric.ep
Update Error Prone to 2.3.1.
2018-04-27 10:27:14 -04:00
Jake Wharton
fa4aa364e1
Merge pull request #512 from square/eric.moshi-docs
Fix up out-of-date comments.
2018-04-27 10:27:03 -04:00
Eric Cochran
1589ca8ddb Group dependency version codes together. 2018-04-25 16:40:20 -07:00
Eric Cochran
0d8b5efaa1
Update Error Prone to 2.3.1. 2018-04-25 16:37:46 -07:00
Eric Cochran
44e6fbd067 Add coherent error message for unencoded map keys. 2018-04-25 11:36:47 -07:00
Eric Cochran
b125f06e70
Fix up out-of-date comments. 2018-04-24 13:17:40 -07:00
Eric Cochran
51d23b5b33 Fix error message for assigning to non-null properties.
instead of falling down to "Required property 'a' missing at $"
2018-04-24 13:05:22 -07:00
Jesse Wilson
1c68437f3c
Merge pull request #506 from square/jwilson.0415.type_resolver
Begin to resolve supertype type parameters
2018-04-16 22:34:03 -04:00
Jesse Wilson
48698a61ad
Merge pull request #507 from square/eric.null-assertion
Disallow null Type from entering user code.
2018-04-16 22:32:59 -04:00
Eric Cochran
84745b0537 Disallow null Type from entering user code.
Otherwise, Moshi.adapter(null) will end up calling into user JsonAdapter factories with a null Type parameter.
Kotlin fails with java.lang.IllegalArgumentException: Parameter specified as non-null is null
That message ends up too far away from the real error.
2018-04-15 21:04:17 -07:00
Jesse Wilson
cc2c818341 Begin to resolve supertype type parameters 2018-04-15 23:21:15 -04:00
Eric Cochran
b860b6da4f
Make error message for dangling names consistent. (#501) 2018-04-15 19:48:32 -07:00
Jesse Wilson
3a2367036c
Merge pull request #505 from square/jwilson.0415.honor_kotlin_supertypes
Support generated adapters for Kotlin superclasses
2018-04-15 15:51:25 -04:00
Jesse Wilson
9401a810f0 Support generated adapters for Kotlin superclasses 2018-04-15 14:37:49 -04:00
Jesse Wilson
8d24d89abf
Model target types, parameters, constructors and properties (#504)
This is intended to make it easier to implement support for subtypes.
2018-04-15 13:46:58 -04:00
Eric Cochran
78091aeb46 Fix JsonUtf8Writer to be strict about names in the wrong place. (#502) 2018-04-15 09:39:04 -04:00
Zac Sweers
941229b6c9 Add apoptions support in KotlinCompilerCall (#499)
* Add apoptions support to KotlinCompilerCall

* Add bad annotated annotation test
2018-04-11 22:30:21 -04:00
Jesse Wilson
f9b758b5bf
Merge pull request #498 from square/jwilson.0410.multiple_types_example
Add an example that decodes multiple formats
2018-04-10 22:20:52 -04:00
Jesse Wilson
c4e4e8582d Add an example that decodes multiple formats 2018-04-10 22:08:31 -04:00
Jesse Wilson
91417d58c6
Merge pull request #496 from square/jwilson.0409.setters
Support properties that don't have a backing field.
2018-04-10 21:15:55 -04:00
Jesse Wilson
d1df4740d5 Support properties that don't have a backing field.
Currently our main loop to gather PropertyGenerators goes over the backing fields.
This needs to change to iterate over the properties themselves. That leads to a lot
of churn. The net result is slightly more compatibility with the reflective adapter.
2018-04-09 00:08:15 -04:00
Jesse Wilson
e80cf48484
Merge pull request #490 from square/jwilson.0407.generate_nonnull
Use JsonAdapter.nonNull() in generated adapters.
2018-04-08 21:05:44 -07:00