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

Add back writeTo(Filer) and originating element APIs #647

Merged
merged 19 commits into from Mar 26, 2019

Conversation

@ZacSweers
Copy link
Collaborator

ZacSweers commented Mar 14, 2019

Resolves #105

This adds back the FileSpec#writeTo(File) API and originating element APIs on TypeSpec, as well as spreading support for originating elements onto PropertySpec and FunSpec (since you could have files with no types). Most of this was borrowed from the original revert in d24e4af

This uses a simpler version of the interface pattern Taggable uses to reuse the logic and make integrating it simple in FileSpec.

@ZacSweers

This comment has been minimized.

Copy link
Collaborator Author

ZacSweers commented Mar 21, 2019

Will rebase this tomorrow

@ZacSweers ZacSweers force-pushed the ZacSweers:z/addBackFiler branch from 7b70839 to f6d0b3e Mar 22, 2019
ZacSweers added a commit to square/moshi that referenced this pull request Mar 26, 2019
This adds support for incremental compilation in gradle via incap helper and marking the code gen as `ISOLATING`.

Depends on a newer version of KotlinPoet that has square/kotlinpoet#647

Resolves #589
ZacSweers added a commit to square/moshi that referenced this pull request Mar 26, 2019
This adds support for incremental compilation in gradle via incap helper and marking the code gen as `ISOLATING`.

Depends on a newer version of KotlinPoet that has square/kotlinpoet#647

Resolves #589
Copy link
Collaborator

Egorand left a comment

Looks good, thanks!

ZacSweers added 2 commits Mar 26, 2019
This reverts commit 1858c44.
@Egorand Egorand merged commit a313063 into square:master Mar 26, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ZacSweers ZacSweers deleted the ZacSweers:z/addBackFiler branch Mar 26, 2019
ZacSweers added a commit to square/moshi that referenced this pull request Apr 18, 2019
This adds support for incremental compilation in gradle via incap helper and marking the code gen as `ISOLATING`.

Depends on a newer version of KotlinPoet that has square/kotlinpoet#647

Resolves #589
ZacSweers added a commit to square/moshi that referenced this pull request Apr 18, 2019
* Support gradle incremental processing in code gen

This adds support for incremental compilation in gradle via incap helper and marking the code gen as `ISOLATING`.

Depends on a newer version of KotlinPoet that has square/kotlinpoet#647

Resolves #589

* Opportunistically update to auto-service 1.0-rc5

Supports incremental compilation and moves annotations to a separate artifact

* 1.2.0 final!

* Mark compiler embeddales as test only
ShaishavGandhi added a commit to ShaishavGandhi/kotlinpoet that referenced this pull request Aug 14, 2019
* Initial pass at OriginatingElement interface

* Wire in OriginatingElementsHolder to TypeSpec

* Remove unnecessary return type

* Read nested elements as well in TypeSpec

* Add back TestFiler

* Opportunistic use idiomatic map assignment

* Use kt for source file

* Add FakeElement for Element instance testing use

* Add back FileSpec.writeTo() with original FileWriting and TypeSpec tests

From square@d24e4af

* Add List<Element> buildOriginatingElements extension

* Add originating elements to FunSpec

* Add originating elements to PropertySpec

* Add a mixed file to tests

* Add toBuilder tests

* Don't error on non-originating elements members

* Formatting and copyright fixes

* Opportunistic add missing copyright to taggable files

* Back to 2014

* Revert "Opportunistic add missing copyright to taggable files"

This reverts commit 1858c44.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.