fix: prevent data race with cursedRenderer.onMouse#1691
Open
lrstanley wants to merge 1 commit intocharmbracelet:mainfrom
Open
fix: prevent data race with cursedRenderer.onMouse#1691lrstanley wants to merge 1 commit intocharmbracelet:mainfrom
lrstanley wants to merge 1 commit intocharmbracelet:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1691 +/- ##
==========================================
+ Coverage 55.64% 56.50% +0.85%
==========================================
Files 25 25
Lines 1310 1315 +5
==========================================
+ Hits 729 743 +14
+ Misses 491 482 -9
Partials 90 90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c100786 to
f5c8e7a
Compare
- closes charmbracelet#1690 - adds `-race`, `-count`, and `-cpu` - make all viable tests parallel Signed-off-by: Liam Stanley <liam@liam.sh>
f5c8e7a to
04ceac4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in this PR
Fixes a data race in the cursed renderers
OnMousehandler. Opted to capture just the handler, rather than duplicating the reference to keep the intent clear.-race,-count, and-cputo taskfile. Ideally, more people should run with these tests to help cover more data race testing, flaky tests, as well as tests which may not actually surface issues unless the CPU > 1, and vice versa.t.Parallel()(to root or withint.Run()) to all viable tests that don't do any global state or similar mutations.examples/go.mod&examples/go.sumnot being in sync, though unrelated to my change.CONTRIBUTING.md.