-
Notifications
You must be signed in to change notification settings - Fork 159
Comparing changes
Open a pull request
base repository: uber-go/goleak
base: v1.2.1
head repository: uber-go/goleak
compare: v1.3.0
- 13 commits
- 25 files changed
- 8 contributors
Commits on Feb 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 21e4cb1 - Browse repository at this point
Copy the full SHA 21e4cb1View commit details -
Make maxSleep and maxRetires configurable when building options (#94)
Make goleak options more flexible to adapt to users' variety scenarios Signed-off-by: Kante Yin <kerthcet@gmail.com> fix #93 --------- Signed-off-by: Kante Yin <kerthcet@gmail.com> Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com> Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for 751da59 - Browse repository at this point
Copy the full SHA 751da59View commit details
Commits on Mar 21, 2023
-
Minimize permissions to CI workflows (#103)
Set only read permission on CI workflows since they don't need write access.
Configuration menu - View commit details
-
Copy full SHA for 4a14d38 - Browse repository at this point
Copy the full SHA 4a14d38View commit details
Commits on Jun 28, 2023
-
Ignore testing.runFuzzing and testing.runFuzzTests (#105)
When Fuzz testing, if the `-fuzz` flag is used then the fuzzing engine is used to generate test cases out of the seed corpus, this causes `testing.runFuzzTests` to be blocked until a failing input is found or there is a signal to stop generating. On the other hand `testing.runFuzzTests` is called even without the use of the `-fuzz` flag, executes the input testing with all the elements in the seed corpus and it's blocked until every test has run. On both cases, goleak detects them as leaking goroutines, but this are expected goroutines. Internal Ref: GO-2002 Fix #104
Configuration menu - View commit details
-
Copy full SHA for 3e8744f - Browse repository at this point
Copy the full SHA 3e8744fView commit details
Commits on Oct 12, 2023
-
Document incompatibility of VerifyNone with t.Parallel (#107)
It's a known issue that goleak is incompatible with tests being run in parallel. * #16 * #83 Unfortunately, there is no real solution to this issue. * #16 (comment) * #83 (comment) * #83 (comment) This PR at least documents the incompatibility and suggests using `VerifyTestMain` instead.
Configuration menu - View commit details
-
Copy full SHA for 03cb6e6 - Browse repository at this point
Copy the full SHA 03cb6e6View commit details
Commits on Oct 21, 2023
-
ci: Use golangci-lint for linting (#108)
Instead of hand-managing and running linters, use golangci-lint. This simplifies the Makefile and allows lint to run in parallel with the build/test job. Along with the golangci-lint defaults, enable a couple other linters we generally agree with. See also uber-go/zap#1323 and uber-go/sally#121 for similar changes.
Configuration menu - View commit details
-
Copy full SHA for f995fdb - Browse repository at this point
Copy the full SHA f995fdbView commit details
Commits on Oct 22, 2023
-
internal/stack: Use control flow for state (#110)
In anticipation of parsing more information from stack traces make the stack trace parsing logic more manageable by moving it from a state machine into a layout closer to a recursive descent parser. That is, instead of a central loop that reads input line-by-line and needs to manage its various states: current, result := ... for { input := read() if cond(input) { result.append(current) current = startNew(input) } else { current = accumulate(input) } } result = flush(current) Break it down so that parsing of individual results is its own function, representing the state machine via control flow. result := ... for { input := read() if cond(input) { result.append(parseOne()) } } // where func parseOne(input) { value := ... for ; !cond(input); input = read() { value = accumulate(input) } return value } The net effect of this is to make the parsing logic more maintainable once it gets more complex -- adds more states. For example, to parse more information for individual stacks with a state machine, we'd have to make the main loop more complex. State for an individual stack (e.g. "all the functions in the stack") will leak into the state management for the whole state machine. On the other hand, with this method, we'll only modify parseStack, keeping its responsiblity encapsulated to parsing a single stack trace. This idea was also demonstrated recently in the first section of [Storing Data in Control flow by Russ Cox][1]. [1]: https://research.swtch.com/pcdata#step --- To make it easy to write this parser, we switch from bufio.Reader to bufio.Scanner, and wrap it with the ability to "Unscan": basically "don't move forward on next Scan()". Lastly, we need to bump the `go` directive in go.mod to Go 1.20 to allow use of errors.Join.
Configuration menu - View commit details
-
Copy full SHA for 25cbb67 - Browse repository at this point
Copy the full SHA 25cbb67View commit details
Commits on Oct 23, 2023
-
stack: Parse all functions (#111)
Adds support to the stack parser for reading the full list of functions for a stack trace. NOTE: The function that created the goroutine is NOT considered part of the stack. We don't maintain the order of the functions since that's not something we need at this time. The functions are all placed in a set. This unblocks #41 and allows implementing an IgnoreAnyFunction option (similar to the stalled #80 PR). Depends on #110
Configuration menu - View commit details
-
Copy full SHA for 91de685 - Browse repository at this point
Copy the full SHA 91de685View commit details -
ignores: Don't use strings.Contains (#112)
Instead of matching for built-in functions with strings.Contains, use the parsed stack information to match function names exactly. Following this change, the only remaining strings.Contains are to match on the goroutine state: ``` % rg strings.Contains utils_test.go 84: if strings.Contains(s.State(), "run") { internal/stack/stacks_test.go 249: if strings.Contains(s.State(), "run") { ``` Resolves #41 Depends on #111
Configuration menu - View commit details
-
Copy full SHA for ecabcf9 - Browse repository at this point
Copy the full SHA ecabcf9View commit details -
README: Fix build status badge (#114)
The CI job was renamed to ci.yml in #108 but the README.md was not updated. Fix the badge URL in the README.
Configuration menu - View commit details
-
Copy full SHA for 66916c2 - Browse repository at this point
Copy the full SHA 66916c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b4998f - Browse repository at this point
Copy the full SHA 7b4998fView commit details
Commits on Oct 24, 2023
-
Revert "Make maxSleep and maxRetires configurable when building optio…
Configuration menu - View commit details
-
Copy full SHA for 5643445 - Browse repository at this point
Copy the full SHA 5643445View commit details -
### Fixed - Built-in ignores now match function names more accurately. They will no longer ignore stacks because of file names that look similar to function names. (#112) ### Added - Add an `IgnoreAnyFunction` option to ignore stack traces that have the provided function anywhere in the stack. (#113) - Ignore `testing.runFuzzing` and `testing.runFuzzTests` alongside other already-ignored test functions (`testing.RunTests`, etc). (#105) ### Changed - Miscellaneous CI-related fixes. (#103, #108, #114) --------- Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for 31095c6 - Browse repository at this point
Copy the full SHA 31095c6View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.2.1...v1.3.0