This command starts a Buck daemon process for the current project in the current working directory. When running other commands, Buck first checks for a running daemon process and if found uses that daemon to execute the command. Using a Buck daemon can save significant amounts of time as it avoids the overhead of starting a Java virtual machine, loading the buck class files and parsing the build files for each command.
The buck daemon writes its port, process id and log output to a
.buckd directory it creates inside the project root directory. Subsequent buck commands use these files to find the daemon process and the buckd command uses them to kill any existing daemon process for the project when it is run.
It is safe to run several buck daemons started from different project directories and they will not interfere with each other, making buckd suitable for use in shared server environments or where several projects are being worked on concurrently.
Buck daemon processes monitor the project file system while running and invalidate cached build rules if any non source files are changed. Subtrees within the project file system that are specified via the "ignore" setting of the "project" section of .buckconfig are excluded from monitoring. Adding project-specific output directories and source control directories like .git can significantly improve performance and may be necessary to avoid file change overflows when buck daemons are being used to build very large projects.
By default, Buck daemon processes ignore changes to editor temporary files.
A buckd process will be killed if:
- The buck config (e.g. the contents of .buckconfig) changes unless that change is to a config option whitelisted in this file
buck cleanis run
- The daemon has been idle for 24 hours
- The .buckd directory in the workspace is deleted
To disable the daemon from starting, set the environment variable