DapperLib / DapperLib/DapperAOT
InterceptsLocationAttribute with line and character arguments are no longer supported
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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