To improve hermetic builds: by addressing this issue, we can enhance the isolation of builds for Symfony applications using this bundle. Since the builds should run in a fully isolated environment (no network access), we need a way to provide the SASS binary as a pre-requisite and avoid the build system downloading it.
dependency clarity: this will also ensure we know exactly which dependencies the build system requires upfront, making the build process more predictable and maintainable.
offline builds: making sure that "offline" builds of a Symfony app using this bundle will work
Proposed fix
To address this, I suggest modifying the behaviour of SassBuilder. Instead of downloading the SASS binary at build-time, it should first check if the binary is already available in the current system's path. If it finds the binary, it should use that, and only download the file if it is not found.
The current flow looks like this:
flowchart TD
A[Find SASS Binary]
A --> E[Download the file using the existing procedure]
I propose updating it to the following:
flowchart TD
A[Find SASS Binary]
A --> C{Is the SASS binary available in the system path?}
C -->|Yes| D[Return the path to the binary]
C -->|No| E[Download the file using the existing procedure]
This change would prevent unnecessary downloads and make the build process smoother on systems like NixOS and Guix.
Hello,
Today, I attempted to build a new instance of the Symfony demo on NixOS, and you can find the log here: https://gist.github.com/drupol/31f96f358e9d35e1095f0ba5dd92c056.
Why fixing this matters:
Proposed fix
To address this, I suggest modifying the behaviour of
SassBuilder
. Instead of downloading the SASS binary at build-time, it should first check if the binary is already available in the current system's path. If it finds the binary, it should use that, and only download the file if it is not found.The current flow looks like this:
I propose updating it to the following:
This change would prevent unnecessary downloads and make the build process smoother on systems like NixOS and Guix.
Let me know what you think of the idea.