Skip to content

Remove compat workaround for interceptors file path lookup. #72265

@RikkiGibson

Description

@RikkiGibson

Related to #71879
https://github.com/dotnet/roslyn/blob/main/docs/features/interceptors.md

Temporarily, for compatibility purposes, when the initial matching strategy outlined above fails to match any syntax trees, we will fall back to a "compat" matching strategy which works in the following way:

  • A mapped path of each syntax tree is determined by applying /pathmap substitution to SyntaxTree.FilePath.
  • For a given [InterceptsLocation] usage, the filePath argument value is compared to the mapped path of each syntax tree using ordinal string comparison. If exactly one syntax tree matches under this comparison, that is the referenced syntax tree. Otherwise, an error occurs.

Support for the "compat" strategy will be dropped prior to stable release.

Note: this issue is referenced in src/doc

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions