3

This is a vocabulary question. I know the concept of reproducible build as the guarantee we can build software from the sources on a different host or at a different time, but producing an end-product identical at the byte level each time.

But I'm not quite sure if we can talk about (or if there is an equivalent to) "reproducible builds" when working with interpreted languages (PHP, JavaScript, Python, ...)

Should I talk about "reproducible build" when it is just a matter of providing a well-controlled environment1?


1 throuh a virtual environement, a container, a VM or whatever elese

2

A "build" does not have though to be a compilation step.

".. the term build is similar to that of any other field. That is, the construction of something that has an observable and tangible result." https://en.wikipedia.org/wiki/Software_build

More important in this context is to be able to reuse results of your build in other contexts to build new things.

That is, also in PHP and Javascript you could produce some packaged artefacts, be it a zip file or language specific archive linkable to a dependency manager: NPM in Javascript and Composer in PHP for example.

2

Just extending Peter's answer, in the context of a CI/CD pipeline.

A build could simply be any sort of verification (static analysis, lint checking or any kind of code inspections, for example), maybe producing nothing more than just pass/fail results, configured to be executed in the CI/CD pipeline.

The ability to perform such verification in a reliably reproducible manner - which is IMHO what would reproducible build translate to in this case - is critical for the very functionality and performance of that CI/CD pipeline.

1
  • agree, that is, the word "build" has actually become too vague, the from scientific method viewpoint, you need a reproducible experiment. Terms from one tool to another may vary. Feb 12 '19 at 17:41
1

To add up another viewpoint, your last sentence is exactly that:

Should I talk about "reproducible build" when it is just a matter of providing a well-controlled environment?

Yes, doing a reproducible build is just about providing a controlled environment, producing the same output at the bytes level means you control the compiler, the libraires, etc.

What does probably bother you is that a php application doesn't produce a binary at build time, but it does still need a controlled environment to produce the same byte code for the CPU when interpreted.

Took the other way, a C compiler is as much an interpreter as a php engine, it just doesn't come in the pipeline at the same time but it still read human friendly text to produce instructions for a processor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.