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

Fix multithreading issue in ConsoleNugetLogger #322

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

waf
Copy link
Owner

@waf waf commented Nov 17, 2023

Add some locking to prevent multithreading-related errors in ConsoleNugetLogger.

There could be some more interesting ways of solving this (e.g. immutable collections, or concurrent collections with snapshotting), but let's just try some good ol' fashioned locking first.

Fixes #311. Note that the nuget package mentioned in that issue doesn't actually appear to be installable in .NET 8 (I believe it's an issue with the package, as opposed to an issue with CSharpRepl). But this PR fixes the exception mentioned in that issue.

@waf waf linked an issue Nov 17, 2023 that may be closed by this pull request
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (ba21d40) 77.4% compared to head (f0478df) 77.4%.

Files Patch % Lines
CSharpRepl.Services/Nuget/ConsoleNugetLogger.cs 94.1% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #322   +/-   ##
=====================================
  Coverage   77.4%   77.4%           
=====================================
  Files         83      83           
  Lines       5583    5596   +13     
  Branches     736     735    -1     
=====================================
+ Hits        4323    4336   +13     
  Misses       992     992           
  Partials     268     268           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@waf waf merged commit c4770f5 into main Nov 17, 2023
3 checks passed
@waf waf deleted the add-locking-on-console-nuget-logger branch November 17, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing System.Automation.Management nuget package fails Failing to install NJsonSchema
1 participant