On Thu, Jul 28, 2022 at 6:36 AM 'Peter Moore' via tup-users <
[email protected]> wrote:

> I've hit a problem with building go executables when `.gitignore` tup
> directive is active.
>
> Specifically, it seems `go build` scans repository `.gitignore` files and
> thus tup considers them as inputs that should be declared.
>
>
You can try using an output exclusion to ignore dependencies. It would look
something like this:

$ cat Tupfile
.gitignore
: |> go build -o %o |> hello-world ^/.gitignore

(The ^ denotes a regex pattern to match against files. Any files
read/written to that match the pattern are dropped and ignored).

I'm not familiar with building go programs in general. I'm guessing 'go
build' is their own internal build system for creating a whole go program?
That sort of situation (embedding a full build system run inside a tup
rule) is unlikely to scale well, but for a small program you might not care.

While trying to test this locally I noticed an issue if your exclusion
pattern matches the expected output file, so I suggest grabbing the latest
if you hit an internal error about tup_entry_rm called when refcount=1.

Hope that helps!
-Mike

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tup-users/CA%2B6x0LVooZe2GUAhdF4NpwgZqR%2BS5nce-_os6EXmv5eqsjpP6A%40mail.gmail.com.

Reply via email to