lima
lima copied to clipboard
Stop cleaning the vendor directory on make
Description
It is fine that it is removed on "clean", but annoying that it is deleted on "make".
I sometimes use go mod vendor for reference, and then I have to run it again...
My workaround is make exe (also skips rebuilding the agents)
But I would prefer if make didn't touch any existing "vendor" dir ?
I don't have strong opinions, but would prefer that make all be equivalent to make clean binaries even if the default target doesn't invoke clean anymore.
But all is the default target, so then it doesn't matter ?
At least lima doesn't only call clean, like machine did...
But
allis the default target, so then it doesn't matter ?
No, I meant we could make binaries the default target, and remove the dependency on clean, like
binaries:
...
all: clean binaries
...
There is clearly some system to these makefiles, with the _output and the automatic clean and so on...
My assumptions are more based on autotools and friends (or maybe just make), and it had default targets.
The build targets are also "phony", which means that make is out of the loop anyway (rebuilds every time). For some other projects I did try to "make depend" work, but it wasn't really worth it (similar to with javac)
Anyway, if make all starts cleaning that is also confusing 😀
So that is why I thought it would be better to just leave it as-is
Anyway, if
make allstarts cleaning that is also confusing 😀
It is already cleaning because right now binaries is cleaning:
all: binaries
binaries: clean
I was just removing the clean from binaries and making binaries the default.
So that is why I thought it would be better to just leave it as-is
I'm fine with leaving everything as-is; I thought you wanted make to not run clean.
I thought you wanted
maketo not runclean.
Right, but "binaries" would still be cleaning anyway ?
Actually the issue was only about the (go mod) "vendor" directory... (I don't really care if the binaries are deleted/rebuilt, because cache)
The "clean" target is also breaking parallel builds (currently disabled)
.NOTPARALLEL:
Unfortunately go does not support the make job server (yet?)
So removing the serial build would spawn up to 5 times as many (since it would build guestagent for all 4 architectures in parallel)
I can live with the workarounds, the cure seems worse.