Add --unsafe option to bst checkout
Currently the bst checkout
command uses file copies exclusively to provide build output to the user, this is the correct default behavior because if we were to hardlink files then the user can easily corrupt their artifact cache accidentally by writing to a hardlinked file.
There are some cases however where the user wants a checkout quickly and without using a huge amount of disk space, and if the user is at least aware that the checkout is unsafe and risky, we should allow it.
One legitimate use case for this, as Sébastien pointed out in this thread, is for IDE features which parse header files and provide text completion features, symbol browsers and the like; these features cannot be easily (or properly) exercised without a standard sysroot containing exactly the header files and other development metadata (such as girs or whatnot) which correspond with the target environment you are developing for.
Implementing this should be very easy, we only need to decide on the right name and help string for the unsafe but fast, hardlink using checkout command option, and use utils.link_files()
instead of utils.copy_files()
.