Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/NLogPublic

CallSiteLayoutRenderer - Obsolete CleanNamesOfAnonymousDelegates + CleanNamesOfAsyncContinuation#5949

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
snakefoot wants to merge1 commit intoNLog:dev
base:dev
Choose a base branch
Loading
fromsnakefoot:cleanup_obsolete

Conversation

@snakefoot
Copy link
Contributor

@snakefootsnakefoot commentedJul 26, 2025
edited
Loading

Unit-tests on Linux frequently fails when CleanNamesOfAnonymousDelegates=false or CleanNamesOfAsyncContinuation=false when running on NET8 (instead of NET6)

  • LogAfterTaskRunAwait_CleanNamesOfAsyncContinuationsIsFalse_ShouldNotCleanNames

Maybe some new optimization in the NET8 JIT-compiler (inlines so cleanup is not needed)

  • Wait for NLog v6.1

See also#5923

@coderabbitai
Copy link

coderabbitaibot commentedJul 26, 2025
edited
Loading

Walkthrough

Two boolean properties on CallSiteLayoutRenderer were marked obsolete and hidden from editor browsing; all usages are wrapped with pragma directives to suppress obsolete warnings. Unit tests were updated to remove explicit uses and test cases for these options.

Changes

Cohort / File(s)Change Summary
Layout renderer
src/NLog/LayoutRenderers/CallSiteLayoutRenderer.cs
MarkedCleanNamesOfAnonymousDelegates andCleanNamesOfAsyncContinuations with[Obsolete(...)] and[EditorBrowsable(...)]; added#pragma warning disable CS0618 /restore around their usages.
Unit tests
tests/NLog.UnitTests/LayoutRenderers/CallSiteTests.cs
Removed explicit layout flags and test cases referencing the deprecated properties; updated remaining tests to rely on defaults and adjusted layout strings/expectations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit nibbles old flags away,
Marks them obsolete, then hops to play.
Warnings muted, tests trimmed down light,
Code stays steady by moonlit night.
🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from theIntegrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


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
🪧 Tips

Chat

There are 3 ways to chat withCodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag@coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag@coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on oursupport page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add@coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add@coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add@coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a.coderabbit.yaml file to the root of your repository.
  • Please see theconfiguration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit ourStatus Page to check the current availability of CodeRabbit.
  • Visit ourDocumentation for detailed information on how to use CodeRabbit.
  • Join ourDiscord Community to get help, request features, and share feedback.
  • Follow us onX/Twitter for updates and announcements.

Copy link

@coderabbitaicoderabbitaibot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
tests/NLog.UnitTests/LayoutRenderers/CallSiteTests.cs (1)

1197-1197:Same naming nit as above

See comment on Line 1167 about dropping “IsTrue” from the test method name for clarity.

🧹 Nitpick comments (1)
tests/NLog.UnitTests/LayoutRenderers/CallSiteTests.cs (1)

1167-1167:Consider renaming test to remove “IsTrue” from its name

With the option hidden/obsolete and defaults doing the cleaning, the method nameLogAfterTaskRunAwait_CleanNamesOfAsyncContinuationsIsTrue_ShouldCleanMethodName can be shortened (e.g.,LogAfterTaskRunAwait_ShouldCleanMethodName) to avoid implying a tunable setting.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between030519f and53cbb75.

📒 Files selected for processing (2)
  • src/NLog/LayoutRenderers/CallSiteLayoutRenderer.cs (6 hunks)
  • tests/NLog.UnitTests/LayoutRenderers/CallSiteTests.cs (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/NLog/LayoutRenderers/CallSiteLayoutRenderer.cs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: task-list-completed
  • GitHub Check: task-list-completed
🔇 Additional comments (5)
tests/NLog.UnitTests/LayoutRenderers/CallSiteTests.cs (5)

415-415:LGTM: removed obsolete cleaning flag; class-only callsite remains correct

The updated layout${callsite:ClassName=true:MethodName=false} matches the test assertion intent and avoids obsolete configuration.


448-448:LGTM: removed obsolete cleaning flag with IncludeNamespace override

${callsite:ClassName=true:MethodName=false:IncludeNamespace=false} preserves the previous semantics while no longer referencing the obsolete option.


1167-1167:LGTM: rely on default async-continuation cleaning

Droppingcleannamesofasynccontinuations and using${callsite:classname=false} aligns with the obsoletion and keeps the assertion stable.


1197-1197:LGTM: remove obsolete async-continuation flag; class name + namespace case remains covered

${callsite:classname=true:includenamespace=true} is the right replacement and matches the expectation.


382-382:✅ No remaining obsolete CallSite flags detected – Ready to merge.

A project-wide search confirms that all references to the now-obsoleteCleanNamesOfAnonymousDelegates andCleanNamesOfAsyncContinuations flags exist only as:

  • Obsolete properties insrc/NLog/LayoutRenderers/CallSiteLayoutRenderer.cs (marked with[Obsolete] and left with their defaulttrue values for backward compatibility).
  • Changelog entries inCHANGELOG.md documenting their deprecation.
  • Unit tests undertests/NLog.UnitTests/LayoutRenderers/CallSiteTests.cs that verify the default cleaning behavior (no tests set these flags tofalse).

No occurrences of these flags were found in XML/layout configurations, tests setting them tofalse, or any other code paths. All cleanup has been applied correctly.

@sonarqubecloud
Copy link

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@snakefoot

[8]ページ先頭

©2009-2025 Movatter.jp