narrow-vegetable-37489
10/26/2022, 9:26 PMbuf during ./pants fmt when manually bumping buf to 1.9.0 -> š§µnarrow-vegetable-37489
10/26/2022, 9:26 PMFailure: exec: "diff": cannot run executable found relative to current directory
The buf backend uses BinaryShims to get diff into the sandbox when running buf. I did some digging around and it sounds like Go since 1.19 (which I assume the latest buf release from a few days ago is compiled with) dislikes relative paths in `PATH` when running executables. Taking a look at BinaryShims.bin_directory, which is whatās added to PATH in order for buf to find our sandboxed diff, it is very much relative.
The easy fix would be to set the absolute path of BinaryShims.bin_directory in PATH instead. The question is should this path be āabsolutifiedā in the buf backend before passing it to PATH, or should BinaryShims be updated so bin_directory always is absolute? Iām also wondering if making it absolute will conflict with Pantsā caching somehow? Thatās currently way outside my area of Pants knowledge!hundreds-father-404
10/26/2022, 9:28 PMBinaryShims (that is not at all sarcastic, it's a great idea!)curved-television-6568
10/26/2022, 9:31 PMcurved-television-6568
10/26/2022, 9:31 PMcurved-television-6568
10/26/2022, 9:33 PMnarrow-vegetable-37489
10/26/2022, 9:34 PM__run.sh in the sandbox manually with an absolute PATH instead and that made buf very happy.fast-nail-55400
10/26/2022, 9:43 PMfast-nail-55400
10/26/2022, 9:43 PMfast-nail-55400
10/26/2022, 9:44 PMso would have to be a bootstrap step to adjust path before proceeding, I thinkyup!
narrow-vegetable-37489
10/26/2022, 9:48 PMcurved-television-6568
10/27/2022, 3:10 AMcurved-television-6568
10/27/2022, 3:10 AMcurved-television-6568
10/27/2022, 3:12 AMcurved-television-6568
10/27/2022, 1:43 PMfast-nail-55400
10/27/2022, 4:21 PM