pinot icon indicating copy to clipboard operation
pinot copied to clipboard

Thrift Generated Code Doesn't Have License

Open ankitsultana opened this issue 2 years ago • 3 comments

At present, if I modify a thrift file (say query.thrift) and re-generate the corresponding files the Thrift compiler doesn't add licenses and the subsequent build fails. Only after manually copy-pasting the license to the generated files are we able to proceed.

Can someone share if this is expected?

Also should the thrift generated code be checked in? If we remove them from Git and let the maven thrift plugin generate it then we won't need to prefix them with the license.

ankitsultana avatar Aug 03 '22 16:08 ankitsultana

What I usually do is to run mvn licence:format after re-generating the thrift files. This command will add the missing headers automatically.

We can also remove the auto-generated thrift classes and only generate them during compilation. @ankitsultana Do you want to give it a try?

Jackie-Jiang avatar Aug 03 '22 23:08 Jackie-Jiang

@ankitsultana did this work for you? can this issue be closed?

npawar avatar Aug 11 '22 16:08 npawar

I was thinking of configuring the maven-thrift plugin so we don't have to check-in the generated code. I'll try to pick it up soon.

ankitsultana avatar Aug 11 '22 17:08 ankitsultana