[go-nuts] Re: Disable test result caching from within Go code?

2019-04-11 Thread twpayne
OK, I guess that Go has no solution for this. On Friday, March 29, 2019 at 2:20:53 AM UTC+1, twp...@gmail.com wrote: > > I have a bunch of integration tests which depend on external services. > I've added the build tag "integration" for each source file containing such > tests so they are only

[go-nuts] Disable test result caching from within Go code?

2019-03-28 Thread twpayne
I have a bunch of integration tests which depend on external services. I've added the build tag "integration" for each source file containing such tests so they are only run when I do: $ go test -tags=integration ./... Go 1.12, by default, caches the tests results, which is exactly what I

[go-nuts] Why does "go mod" ignore tags in this case?

2019-02-20 Thread twpayne
tl;dr "go mod" writes a timestamp/commit hash to go.mod when a perfectly good tag exists. I don't understand why go.mod doesn't use the tag. Given this library https://github.com/twpayne/go-xdg with a "v2.0.0" tag: https://github.com/twpayne/go-xdg/releases/tag

[go-nuts] Re: Existing code for order-preserving concurrent work queue?

2019-01-25 Thread twpayne
Tom > > > Background info to avoid the XY problem <http://xyproblem.info/>: this is > to make chezmoi <https://github.com/twpayne/chezmoi> run faster. I want > to run the doctor checks > <https://github.com/twpayne/chezmoi/blob/ed27b49f9ca4cd3662e6a59908dee24b0d29

Re: [go-nuts] Existing code for order-preserving concurrent work queue?

2019-01-25 Thread twpayne
This is accurate for the details, but not accurate overall. Basically I want "parallel map". Input order defined. Element-wise transformations are independent. Output order must be the same as input order. If a worker stalls, I'm quite happy with the entire process stalling at the point. On

Re: [go-nuts] Existing code for order-preserving concurrent work queue?

2019-01-25 Thread twpayne
dard Go pattern out there which can do it. My web search >> skills didn't find such a library though. Do you know of one? >> >> Cheers, >> Tom >> >> >> Background info to avoid the XY problem <http://xyproblem.info/>: this >> is to make c

Re: [go-nuts] Existing code for order-preserving concurrent work queue?

2019-01-25 Thread twpayne
gt; > Background info to avoid the XY problem <http://xyproblem.info/>: this is > to make chezmoi <https://github.com/twpayne/chezmoi> run faster. I want > to run the doctor checks > <https://github.com/twpayne/chezmoi/blob/ed27b49f9ca4cd3662e6a59908dee24b0d295b79/cmd

[go-nuts] Existing code for order-preserving concurrent work queue?

2019-01-25 Thread twpayne
such a library though. Do you know of one? Cheers, Tom Background info to avoid the XY problem <http://xyproblem.info/>: this is to make chezmoi <https://github.com/twpayne/chezmoi> run faster. I want to run the doctor checks <https://github.com/twpay

[go-nuts] What's the best way to detect if CGO is enabled?

2019-01-14 Thread twpayne
Whether CGO is enabled or not affects how reliable certain standard library functions are. For example, os/user.LookupGroupId is untrustworthy if CGO is not enabled (example 1 <https://github.com/twpayne/chezmoi/issues/65>, example 2 <https://github.com/twpayne/chezmoi/issues/125>)

[go-nuts] Algorithm question: reversing text/template.Template.Execute efficiently

2019-01-10 Thread twpayne
As part of chezmoi <https://github.com/twpayne/chezmoi>, I want to reverse text/template.Template.Execute, i.e. given some template output, and some data that was used to generate that output, I want to generate the best possible input template that given the data generates the same

[go-nuts] [ANN] go-vfs: testing of code that uses os and ioutil made easy

2018-12-17 Thread twpayne
Link: github.com/twpayne/go-vfs Package vfs provides an abstraction of the os and ioutil packages that is easy to test. Key features: - File system abstraction layer for commonly-used os and ioutil functions from the standard library. - Powerful testing framework, vfst <https://github.