Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Sourcery poc #400

Closed
wants to merge 19 commits into from
Closed

Sourcery poc #400

wants to merge 19 commits into from

Conversation

joesus
Copy link
Contributor

@joesus joesus commented Apr 5, 2019

Checklist

  • I've read the Contributing Guidelines and the Code of Conduct
  • I've completed the Contributor License Agreement
  • I've ensured that all existing tests pass and added tests (when/where necessary)
  • I've ensured that my code lints properly: (swiftlint && swiftlint autocorrect --format)
  • I've updated the documentation (when/where necessary) and Changelog (when/where necessary)
  • I've added the proper label to this pull request (e.g. bug for bug fixes)

Pull Request Details

Initial steps at using Sourcery and Stencil to generate code that will play nice with ObjC.

What this is:

  • instantiating wrapper classes for structs and enums
  • instantiating wrapper classes for classes since they may contain properties that do not work with ObjC
  • setting up pass-through properties
  • a few dummy classes for experimenting with the stencil templates

What this is not:

  • fully implemented

What is missing:

  • methods
  • complex types such as generics
  • unit testing wrapper classes

@facebook-github-bot facebook-github-bot added the CLA Signed The Facebook CLA has been signed label Apr 5, 2019
Copy link
Contributor

@codytwinton codytwinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple changes required

.gitattributes Outdated
@@ -0,0 +1 @@
./Sourcery/Generated/* linguis-generated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/github/linguist#generated-code

Suggested change
./Sourcery/Generated/* linguis-generated
Sourcery/Generated/* linguist-generated=true

.sourcery.yml Outdated
sources:
- ./Sources/Core
templates:
- ./Sourcery/Templates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ./Sourcery/Templates
- ./Codegen/Templates

.sourcery.yml Outdated
templates:
- ./Sourcery/Templates
output:
./Sourcery/Generated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
./Sourcery/Generated
./Codegen/Generated

@joesus
Copy link
Contributor Author

joesus commented Apr 5, 2019

@codytwinton - Let me know when this looks ready to merge and I'll do a sweep and remove the dummy project and files. Left them in there to make it easier to review but they should not be included. 👍

@joesus joesus closed this Apr 10, 2019
@joesus joesus deleted the sourcery-poc branch April 17, 2019 17:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed The Facebook CLA has been signed Do Not Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants