You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make gremlins work in packages, not only in the root of a go module.
A first step can be to read the go.mod location from the GOMOD env instead of looking for it at the current path (coverage.go:76):
cmd := exec.Command("go", "env", "GOMOD")
Even better, we can use the same approach Go itself uses, searching backwards in the directory tree to find a go.mod
Then the paths in the generated profile should be revised to be relative to the current location.
The biggest problem to solve will be on how to run the tests in the workdir. Currently, gremlins works well for small projects because copies are cheap, but a gigabyte sized project will be problematic. To make the package test work, we should copy all the source tree, but doing this on large projects may spoil the benefit of running gremlins only on packages. How do we solve this?
The text was updated successfully, but these errors were encountered:
Make gremlins work in packages, not only in the root of a go module.
A first step can be to read the go.mod location from the GOMOD env instead of looking for it at the current path (coverage.go:76):
Even better, we can use the same approach Go itself uses, searching backwards in the directory tree to find a go.mod
Then the paths in the generated profile should be revised to be relative to the current location.
The biggest problem to solve will be on how to run the tests in the workdir. Currently, gremlins works well for small projects because copies are cheap, but a gigabyte sized project will be problematic. To make the package test work, we should copy all the source tree, but doing this on large projects may spoil the benefit of running gremlins only on packages. How do we solve this?
The text was updated successfully, but these errors were encountered: