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 comment in generated codec that its generated #22

Open
D0han opened this issue Feb 14, 2019 · 3 comments
Open

Add comment in generated codec that its generated #22

D0han opened this issue Feb 14, 2019 · 3 comments

Comments

@D0han
Copy link

D0han commented Feb 14, 2019

Add comment in generated codec that its generated, so they can be easily distinguished from actual code in workspace.

@kamichal
Copy link
Collaborator

Sure, no problem, will do in next release, but there are no codecs that are not generated.
I mean each file containing a codec is generated "by machine" and if user adds these files to some project or VCS so that it mixes up with "hand-written" code, then it's assumed that the user can distinguish it.

@florczakraf
Copy link
Contributor

but there are no codecs that are not generated

Why? What if I just want to define some interface in python and don't want any other bindings? I don't need it to be generated from any other schema language in that case.


I can also see how such comment could help to debug some cases if it included prophy's and libclang versions.

@kamichal
Copy link
Collaborator

kamichal commented Mar 13, 2019

@florczakraf Yes, your're right. Version 1.2.0 already implements adding # This file has been generated by prophyc. sentence at the beginning of each python codec file.
We can add also prophyc version from prophyc/__init__.py, but I would rather refuse adding libclang's version. It makes sense only for codecs generated with use of clang, but python codec can be generated from other sources as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants