conjure-python icon indicating copy to clipboard operation
conjure-python copied to clipboard

Add a header for autogenerated classes

Open ktekelioglu opened this issue 3 years ago • 0 comments

What happened?

This issue is linked to https://github.com/palantir/conjure-python/issues/595. When I discovered an issue with the palantir-python-sdk library, it was pretty much impossible to know that the bug was originating from conjure-python until the person who owns the project told me so.

Additionally, after a bug is fixed in this library, there's currently no way to know if a class generated by this library may be impacted by that bug.

What did you want to happen?

Projects that generate code usually include annotations or a header, so that it's clear how this code is generated (examples that come to mind are jOOQ / Immutables) Ideally, this should include a version number, so that it's easier to read changelogs and understand any potential impact.

Here's what a simple implementation could look like:

'''
This file has been generated by conjure-python version x.y.z
https://github.com/palantir/conjure-python
'''

import ...

class TestService(Service):

ktekelioglu avatar Aug 03 '22 09:08 ktekelioglu