A spack environment contains two main components:
spack.yaml: gives an abstract details of specs and other configurations.spack.lock: gives concrete details of specs.
If we use spack.yaml to reproduce environment, we get an approximate builds with packages maybe built using different dependencies, compilers etc. based on the machine architecture.
If we use spack.lock to reproduce environment, we get exact builds because it contains all the concrete information. However, this may not support system of different architecture and toolchains.