DapperLib / DapperLib/DapperAOT

InterceptsLocationAttribute with line and character arguments are no longer supported

Open
#148 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
472
Forks
43
Avg merge
1d 4h
Merged PRs (30d)
18

Description

Describe the bug

I just updated to the latest .NET SDK, version 9.0.200, and I'm getting these new warnings from code generated by DapperAOT.

warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)

It seems that the attribute constructor that takes a line number and a character position is deprecated in favor of a new API that's described in the issue linked in the warning above.

To Reproduce
Use DapperAOT version 1.0.45 with .NET SDK version 9.0.200.

Expected behavior
Preferably no warnings.

Additional context
I believe the existing code is still working but will break eventually so this should be fixed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the warning with DapperAOT 1.0.45 and .NET SDK 9.0.200, then inspect the generated code that uses InterceptsLocationAttribute(string, int, int). Read the linked Roslyn issue about InterceptableLocation-based generation; done means the generated code builds without CS9270 warnings while retaining its current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.