https://pantsbuild.org/ logo
s

silly-queen-7197

03/01/2023, 5:34 PM
If I run generate-lockfiles on mac and plan to deploy on linux, should I commit my lockfiles? Additionally, are there any resources on package lockfiles and does pants package lockfile follow any standard that I can read up on?
e

enough-analyst-54434

03/01/2023, 5:45 PM
Yes - the lock files are cross-platform for Mac & Linux by default and you should check them in. There is no documentation on the lock files or their format. It is a proprietary format like all others at this point since https://peps.python.org/pep-0665/ was rejected and there has been no replacement. Pex is ready to export to that standard though as soon as it happens.
b

busy-vase-39202

03/01/2023, 5:47 PM
Although there's no documentation, there's a blog post about multiple lockfiles fwiw https://blog.pantsbuild.org/multiple-lockfiles-python/
s

silly-queen-7197

03/01/2023, 5:58 PM
These are great, thanks so much! - Edit heh I didn't read the entire response before commenting. That's a bummer about PEP 665
e

enough-analyst-54434

03/01/2023, 6:06 PM
@silly-queen-7197 what is your particular interest in a standard here. Do you want to be able to parse the lock file or use it with some other tool?
s

silly-queen-7197

03/01/2023, 6:31 PM
My interest currently is just trying to get up to speed about them so I can field questions from coworkers.
e

enough-analyst-54434

03/01/2023, 6:31 PM
Ah. In that case I'd think the json is pretty self-explanatory as far as lock file format goes.
5 Views