Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make gremlins work in packages #50

Closed
k3rn31 opened this issue Jul 23, 2022 · 0 comments · Fixed by #120
Closed

Make gremlins work in packages #50

k3rn31 opened this issue Jul 23, 2022 · 0 comments · Fixed by #120
Assignees
Labels
c/feature Category: An issue or PR related to a new feature
Milestone

Comments

@k3rn31
Copy link
Member

k3rn31 commented Jul 23, 2022

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?

@k3rn31 k3rn31 added c/feature Category: An issue or PR related to a new feature p/hight Priority: Hight labels Jul 23, 2022
@k3rn31 k3rn31 added this to the v0.2.0 milestone Jul 23, 2022
@k3rn31 k3rn31 removed the p/hight Priority: Hight label Jul 24, 2022
@k3rn31 k3rn31 modified the milestones: v0.2.0, v0.3.0 Jul 24, 2022
@k3rn31 k3rn31 self-assigned this Aug 9, 2022
@k3rn31 k3rn31 linked a pull request Aug 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/feature Category: An issue or PR related to a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant