Dnia 2021-03-30, o godz. 14:20:29
"'Axel Wagner' via golang-nuts" <golang-nuts@googlegroups.com> napisaƂ(a):

> FWIW I believe printing every build constraint for every file skipped is
> far too verbose, even for -n or -v mode.

Both -n and -v modes already are very verbose, for purpose. 

If I am giving either I expect to see a torrent of information. Now I can see 
exact
compile commands, what is missing and so on but the simple information that
a file was excluded isn't there. It might be.

> That's notably very different from a distinct flag or command, which
> doesn't spam in the common case and can filter the information down
> to a more useful subset.

Of course it would be better to have specialized flag, eg. "-excluded"

> You don't need a regexp. You just need to grep for `// +build`.

Heh, `// +build` is-a regexp :) Grep is fast, nonetheless `grep -rn "// +build"`
matches this regexp on every line of every file (you also can find -print| but 
that's
yet more to alias and run). Just to print what `build` can just log after 
reading
a few lines it must read anyway.


DESIRED:
     go build -n -excludes -tags bsddebug

> >    (command config lines elided)
> > ./a.go excluded at line 4: // +build darwin freebsd netbsd openbsd
> > ./b.go excluded at line 3: // +build lindebug,linux
> > ./c.go excluded at line 3: // +build !lindebug,!bsddebug
> > ./d.go excluded at line 3: // +build windows
> > ./e_windows.go excluded by name constraint (GOOS != windows)
> > package github.com/ohir/buildconstr: build constraints exclude all Go
> > files in /path.../buildconstr

TC,

-- 
Wojciech S. Czarnecki
 << ^oo^ >> OHIR-RIPE

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20210330172839.41ee3f69%40xmint.

Reply via email to