Skip to content

Silence compiler warning about AddRangeAsync - #2447

Merged
rmunn merged 1 commit into
developfrom
chore/silence-dotnet-compiler-warning-about-addrangeasync
Jul 16, 2026
Merged

Silence compiler warning about AddRangeAsync#2447
rmunn merged 1 commit into
developfrom
chore/silence-dotnet-compiler-warning-about-addrangeasync

Conversation

@rmunn

@rmunn rmunn commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The dotnet compiler warns about some code added by #2382, saying that we should use AddRangeAsync rather than AddRange because it's in an async method. But the EF Core documentation expicitly says that AddRangeAsync is only for use in special value generators, and all other uses should use AddRange. So we silence the compiler warning and still use AddRange.

The dotnet compiler warns that we should use AddRangeAsync here, but the
EF Core documentation expicitly says that AddRangeAsync is only for use
in special value generators, and all other uses should use AddRange. So
we silence the compiler warning and still use AddRange.
@rmunn rmunn self-assigned this Jul 16, 2026
@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 880e283d-7eba-44c3-80b4-8fc545b0e6c4

📥 Commits

Reviewing files that changed from the base of the PR and between c864509 and dc56dea.

📒 Files selected for processing (1)
  • backend/FwLite/LcmCrdt/Data/LocalCommentReadStatusService.cs

📝 Walkthrough

Walkthrough

MarkCommentsUnread now documents why synchronous AddRange is used and suppresses the associated VSTHRD103 analyzer warning. No persistence or duplicate-handling behavior changes.

Changes

Unread comment status

Layer / File(s) Summary
Document synchronous unread-comment insertion
backend/FwLite/LcmCrdt/Data/LocalCommentReadStatusService.cs
Adds an explanatory comment and narrowly suppresses VSTHRD103 around UnreadComments.AddRange(toInsert).

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: hahn-kev

Poem

A bunny found a warning bright,
And tucked it safely out of sight.
AddRange stays, the flow is clear,
No behavior changes hop near.
One tiny patch, a joyful cheer!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: suppressing the AddRange-in-async warning by referencing AddRangeAsync.
Description check ✅ Passed The description is directly about the warning suppression and why AddRange is kept, which matches the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/silence-dotnet-compiler-warning-about-addrangeasync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@argos-ci

argos-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 16, 2026, 5:50 AM
e2e (Inspect) ⚠️ Changes detected (Review) 4 changed Jul 16, 2026, 5:58 AM

@rmunn

rmunn commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Argos changes look like a false positive. There was a transient failure on one other check, so I'm waiting for the rerun to complete, then I'll merge.

@rmunn
rmunn merged commit 52d98ef into develop Jul 16, 2026
32 of 35 checks passed
@rmunn
rmunn deleted the chore/silence-dotnet-compiler-warning-about-addrangeasync branch July 16, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants