Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread fgergo
Thank you both, for sharing your thoughts on this! On 3/30/21, 'Axel Wagner' via golang-nuts wrote: > Again: I understand what you are asking for and I'm not saying there is no > benefit. > > Personally, I don't feel the benefit is very large and I don't think it's > worth it. You might very

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread 'Axel Wagner' via golang-nuts
Again: I understand what you are asking for and I'm not saying there is no benefit. Personally, I don't feel the benefit is very large and I don't think it's worth it. You might very well think it is and that's fine. As i said in my first message, if anyone feels this is important to have, my

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread Wojciech S. Czarnecki
Dnia 2021-03-30, o godz. 14:20:29 "'Axel Wagner' via golang-nuts" 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

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread 'Axel Wagner' via golang-nuts
Hi, FWIW I believe printing every build constraint for every file skipped is far too verbose, even for -n or -v mode. It is not uncommon to use build constraints and when you do, you often do it for many or even all files in a package. I don't even think it would be helpful, because it would be

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread Wojciech S. Czarnecki
Dnia 2021-03-29, o godz. 20:41:02 fge...@gmail.com napisał(a): > Since the build constraint language is equivalent to a first order logic > language, no guaranteed useful information can be provided in the general > case in a limited time. The build tool decides about exclusion anyway. In the

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread fgergo
On Mon, Mar 29, 2021, 17:46 Wojciech S. Czarnecki wrote: > Dnia 2021-03-29, o godz. 15:17:42 > "'Axel Wagner' via golang-nuts" napisał(a): > > > I still don't understand how you think we should provide this > explanation without solving SAT. > ... > > What is "builtconstraint_1" and how is it

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread Wojciech S. Czarnecki
Dnia 2021-03-29, o godz. 15:17:42 "'Axel Wagner' via golang-nuts" napisał(a): > I still don't understand how you think we should provide this explanation > without solving SAT. ... > What is "builtconstraint_1" and how is it determined by the go tool? My > first impression was that it is

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread fgergo
On 3/29/21, Axel Wagner wrote: > On Mon, Mar 29, 2021 at 2:57 PM wrote: ... > An "explanation" like I described in my 2nd email would be very >> helpful and that isn't more complex than P. (If it is, please provide >> a hint.) >> > > I still don't understand how you think we should provide this

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread 'Axel Wagner' via golang-nuts
On Mon, Mar 29, 2021 at 2:57 PM wrote: > Thanks, fully agree on everything. > > Please consider this workflow: > 1. find package on pkg.go.dev (currently there is no build constraint > specific information listed beside the result, cf. issue #39195) > 2. get package (go get, git clone, cp etc.)

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread fgergo
Thanks, fully agree on everything. Please consider this workflow: 1. find package on pkg.go.dev (currently there is no build constraint specific information listed beside the result, cf. issue #39195) 2. get package (go get, git clone, cp etc.) 3. "build constraints exclude all Go files in ..."

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread 'Axel Wagner' via golang-nuts
FWIW, you might be assuming that a build tag always has the form `// +build linux` or `// +build !cgo` - in which case it's indeed clear what the "correct" answer is and how to determine it. But you can't assume that build tags only take that form, you can express *any* boolean formula, using any

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread 'Axel Wagner' via golang-nuts
I might not understand what you are intending. My understanding is that you want, given a set of .go files, know "why" they are excluded. Which, to me, means finding a configuration of build tags that would allow at least one of them to be built. A file can be built with a set of tags, if the

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread fgergo
Thanks for thinking about the issue! I should have asked for something more explicit, probably something like this: ; go build listconstraintexclusions buildconstraint_1 excludes: file1.go file2.go file3.go buildconstraint_2 excludes: file4.go file5.go No go files left to build. ; Iiuc the

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread 'Axel Wagner' via golang-nuts
In general, answering that question is NP-complete. It's the boolean satisfiability problem . It would be possible to implement *some* solution and maybe stop after a timeout or something. But even then, the answer will not be unique

[go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread fgergo
Is there some functionality to list each build constraint that is not satisfied when the result of go get is "build constraints exclude all Go files in ..."? go mod why is very helpful when module dependencies are to be explained. A similar functionality would be helpful and maybe a message to