Skip to main content

Spindle Thrift-to-Scala code generation plugin for pants build system

Project description

Spindle Codegen Plugin
=================

A plugin for the Pants build system to use Foursquare's
`Spindle <https://github.com/foursquare/spindle>`_ to Thrift-to-Scala code generator.



Configuration
----------


``pants.ini``
^^^^^^^^^^^^^

The ``spindle-gen`` section of pants.ini must contain ``bootstrap-tools`` and ``scala_record``.

The list ``bootstrap-tools`` should include the address of a ``jar_library`` target (usually defined
in ``BUILD.tools``_) for the spindle codegen jar.

The dictionary ``scala_record`` should include a list ``deps`` of address specs to be added to the
``dependencies`` of generated targets.

The minimal pants.ini additions to get Spindle working likely looks more or less like::

[spindle-gen]
bootstrap-tools: ['//:spindle-codegen']
scala_record: {
'target_language': 'scala',
'template': 'scala/record.ssp',
'javaTemplate': 'javagen/record.ssp',
'options': '',
'deps': [
'3rdparty:spindle-runtime',
'3rdparty:mongodb',
'3rdparty:joda-time',
'3rdparty:scalaj-collection',
]
}


``BUILD.tools``
^^^^^^^^^^^^^^^
The ``bootstrap-tools`` config in ``pants.ini`` should point to a target that specifies a spindle
codegen jar::
jar_library(
name = 'spindle-codegen',
jars = [
jar(org = 'com.foursquare', name = 'spindle-codegen-binary_2.10', rev = '3.0.0-M5.1'),
],
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foursquare.pants.spindle-0.0.1.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file foursquare.pants.spindle-0.0.1.tar.gz.

File metadata

File hashes

Hashes for foursquare.pants.spindle-0.0.1.tar.gz
Algorithm Hash digest
SHA256 78334863c3c6da4e0f0da78e9c1162699dd986040fa028daa998104397e2a5bb
MD5 98a6e068da9c8b170b3357e92304548c
BLAKE2b-256 a8069a085cfb174729696b2682cd0f61bec0afed23333435e1372277f63d786a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page