lima icon indicating copy to clipboard operation
lima copied to clipboard

Stop cleaning the vendor directory on make

Open afbjorklund opened this issue 3 years ago • 6 comments

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 ?

afbjorklund avatar Sep 15 '22 10:09 afbjorklund

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.

jandubois avatar Sep 15 '22 16:09 jandubois

But all is the default target, so then it doesn't matter ?

At least lima doesn't only call clean, like machine did...

afbjorklund avatar Sep 17 '22 08:09 afbjorklund

But all is 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
...

jandubois avatar Sep 17 '22 19:09 jandubois

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

afbjorklund avatar Sep 18 '22 07:09 afbjorklund

Anyway, if make all starts 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.

jandubois avatar Sep 18 '22 09:09 jandubois

I thought you wanted make to not run clean.

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)

afbjorklund avatar Sep 18 '22 10:09 afbjorklund

The "clean" target is also breaking parallel builds (currently disabled)

.NOTPARALLEL:

afbjorklund avatar Feb 24 '23 16:02 afbjorklund

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)

afbjorklund avatar Nov 01 '23 13:11 afbjorklund

I can live with the workarounds, the cure seems worse.

afbjorklund avatar Nov 02 '23 08:11 afbjorklund