On Sun, Jul 31, 2022 at 12:01 AM Mike Shal <[email protected]> wrote: > 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). > > This worked perfectly, many thanks Mike! And apologies, this was clearly documented in the man page, I should have seen this.
> 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. > Indeed, in my case these are simple go programs that are used by other parts of the build system, so scaling is not an issue. If you are curious, this is the project: https://github.com/spectrum4/spectrum4. > > 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. > Thanks for the heads up! > Hope that helps! > Very much so! :-) > -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 a topic in the > Google Groups "tup-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/tup-users/kEp_jZMqOfM/unsubscribe. > To unsubscribe from this group and all its topics, 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 > <https://groups.google.com/d/msgid/tup-users/CA%2B6x0LVooZe2GUAhdF4NpwgZqR%2BS5nce-_os6EXmv5eqsjpP6A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- -- 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/CAJ1zLF%3D8q2u%2Bt19CnLwTXr3bjyv89qiSzUt3LF%2BvbXQ8D5X-WQ%40mail.gmail.com.
