google / jsinterop-generator

Generates Java annotated with JsInterop from JavaScript extern sources
Apache License 2.0
75 stars 24 forks source link

Deprecate the generated java api if the js api is deprecated #6

Closed vegegoku closed 6 years ago

vegegoku commented 6 years ago

This change will add @Deprecated on the generated java method or field when the corresponding method or field in the closure extern is deprecated, this will reduce the possibility of errors that happens due to old api usage.

gkdn commented 6 years ago

@jDramaix

jDramaix commented 6 years ago

Thanks for this patch and sorry to be late on the review.

Code looks good but do you mind to add a test?

vegegoku commented 6 years ago

Yes sure

vegegoku commented 6 years ago

@jDramaix tests added, please let me know if anything else need to be done from my side. thank you

jDramaix commented 6 years ago

Awesome, thanks for that!

Could you add tests for deprecated field? Both for class and interface? I want to be sure that the annotation is propagated to setter/getter on interfaces.

vegegoku commented 6 years ago

added a change to propagate the annotation to the setters and getters, plus more tests.

vegegoku commented 6 years ago

@jDramaix Thank you for the review, i will try to work on those today. :+1:

vegegoku commented 6 years ago

@jDramaix i am ready if any further changes are required.

jDramaix commented 6 years ago

Sounds really good now! Thanks for this contribution. I'll try to import the change internally asap.

jDramaix commented 6 years ago

Submitted as 7dc62bb37fa0716f8b7fdef13798e094a4f8c818

Thanks for this contribution!!