plank icon indicating copy to clipboard operation
plank copied to clipboard

Make it easier to detect use of outdated Plank binary

Open RicoYao opened this issue 6 years ago • 3 comments

In a codebase where developers manually execute the Plank binary to generate models, it is difficult to detect scenarios where they may be landing code based on an outdated Plank binary.

One possible solution would be to write a Plank version/build number of some kind into the generated model header block so that version control systems (e.g. Git, SVN) can warn developers with merge errors. e.g.

// Autogenerated by Plank (https://pinterest.github.io/plank/)
// Plank v7.32

RicoYao avatar Aug 23 '19 17:08 RicoYao

@RicoYao - you can add the version to the generated code, in practice we end up updating the models when there is a new version of plank added to our repository

rahul-malik avatar Aug 23 '19 17:08 rahul-malik

@rahul-malik

you can add the version to the generated code

Just confirming what you mean by this - are you suggesting that we configure our own scripts to add the version header after Plank generates the models? We can do that.

RicoYao avatar Aug 23 '19 22:08 RicoYao

I'm just saying that plank can update the file header it generates to output the current version. We have a struct that contains the version that you should be able to utilize

rahul-malik avatar Aug 24 '19 05:08 rahul-malik