Commit 52695a9
authored
Bring back Go to Def, FAR and hover for components via Roslyn (#12501)
Fixes #12276 again
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2633418
Commit-at-a-time is thoroughly recommended.
Commits 1-4 expose a DocumentExcerpt service that Roslyn can use to
provide nice results in FAR etc., because without the code-gen changes,
the generated code is pretty ugly.
Commit 5 "reverts" #12486, bringing
#12287 back but _without_ any
changes to the code-gen this time, just a new source mapping.
Commit 6 is test baseline updates (only source mappings, no .cs files)
Commit 7 removes the requirement for line pragmas to exactly match
source mappings. I left the rest of the validation though
Commit 8 bumps us to a new Roslyn with the new document excerpt
services.File tree
301 files changed
+2505
-524
lines changed- eng
- src
- Compiler
- Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest
- AddAttribute_ImplicitBooleanConversion
- AddAttribute_ImplicitStringConversion_BindUnknown_Assignment
- AddAttribute_ImplicitStringConversion_BindUnknown
- AddAttribute_ImplicitStringConversion_Bind
- AddAttribute_ImplicitStringConversion_CustomEvent
- AddAttribute_ImplicitStringConversion_TypeInference
- AddComponentParameter_DynamicComponentName
- AddComponentParameter_EscapedComponentName
- AddComponentParameter_GlobalNamespace
- AddComponentParameter_WithNameof
- BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic
- BindToComponent_EventCallback_SpecifiesValueAndExpression_NestedGeneric
- BindToComponent_EventCallback_SpecifiesValueAndExpression
- BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties
- BindToComponent_EventCallback_TypeChecked_WithMatchingProperties
- BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties
- BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties
- BindToComponent_SpecifiesValueAndExpression_Generic
- BindToComponent_SpecifiesValueAndExpression
- BindToComponent_SpecifiesValue_WithMatchingProperties_DynamicComponentName
- BindToComponent_SpecifiesValue_WithMatchingProperties_EscapedComponentName
- BindToComponent_SpecifiesValue_WithMatchingProperties_GlobalNamespaceComponent
- BindToComponent_SpecifiesValue_WithMatchingProperties_WithNameof
- BindToComponent_SpecifiesValue_WithMatchingProperties
- BindToComponent_SpecifiesValue_WithoutMatchingProperties
- BindToComponent_TypeChecked_WithMatchingProperties
- BindToComponent_WithAfter_ActionLambda
- BindToComponent_WithAfter_Action
- BindToComponent_WithAfter_AsyncLambdaProducesError
- BindToComponent_WithAfter_EventCallback_ReceivesAction
- BindToComponent_WithAfter_EventCallback_ReceivesFunction
- BindToComponent_WithAfter_EventCallback
- BindToComponent_WithAfter_TaskReturningDelegate
- BindToComponent_WithAfter_TaskReturningLambda
- BindToComponent_WithGetSet_ActionLambda
- BindToComponent_WithGetSet_Action
- BindToComponent_WithGetSet_EventCallback_ReceivesAction
- BindToComponent_WithGetSet_EventCallback_ReceivesFunction
- BindToComponent_WithGetSet_EventCallback
- BindToComponent_WithGetSet_ProducesErrorOnOlderLanguageVersions
- BindToComponent_WithGetSet_TaskReturningDelegate
- BindToComponent_WithGetSet_TaskReturningLambda
- BindToComponent_WithStringAttribute_DoesNotUseStringSyntax
- BindToGenericComponent_ExplicitType_WithAfter_Action
- BindToGenericComponent_ExplicitType_WithGetSet_Action
- BindToGenericComponent_ExplicitType_WithGetSet_EventCallback
- BindToGenericComponent_ExplicitType_WithGetSet_Function
- BindToGenericComponent_InferredType_WithAfter_Action
- BindToGenericComponent_InferredType_WithGetSet_Action
- BindToGenericComponent_InferredType_WithGetSet_EventCallback
- BindToGenericComponent_InferredType_WithGetSet_Function
- BodyAndAttributeChildContent
- BodyAndExplicitChildContent
- CaptureParametersConstraint
- CascadingGenericInference_CombiningMultipleAncestors
- CascadingGenericInference_ExplicitOverride
- CascadingGenericInference_Explicit
- CascadingGenericInference_GenericArgumentNested_Dictionary_02
- CascadingGenericInference_GenericArgumentNested_Dictionary_03
- CascadingGenericInference_GenericArgumentNested_Dictionary_Dynamic
- CascadingGenericInference_GenericArgumentNested_Dictionary
- CascadingGenericInference_GenericArgumentNested
- CascadingGenericInference_GenericChildContent
- CascadingGenericInference_GenericLambda
- CascadingGenericInference_Inferred_MultipleConstraints_ClassesAndInterfaces
- CascadingGenericInference_Inferred_MultipleConstraints_GenericClassConstraints
- CascadingGenericInference_Inferred_MultipleConstraints
- CascadingGenericInference_Inferred_WithConstraints
- CascadingGenericInference_Multilayer
- CascadingGenericInference_MultipleTypes
- CascadingGenericInference_NotCascaded_CreatesError
- CascadingGenericInference_NotCascaded_Explicit
- CascadingGenericInference_NotCascaded_Inferred
- CascadingGenericInference_Override_Multilayer
- CascadingGenericInference_Override
- CascadingGenericInference_ParameterInNamespace
- CascadingGenericInference_Partial_CreatesError
- CascadingGenericInference_Tuple
- CascadingGenericInference_WithSplatAndKey
- ChildComponent_AtSpecifiedInRazorFileForTypeParameter
- ChildComponent_GenericBindWeaklyTyped_TypeInference
- ChildComponent_GenericBindWeaklyTyped
- ChildComponent_GenericBind_TypeInference
- ChildComponent_GenericBind
- ChildComponent_GenericChildContent_TypeInference
- ChildComponent_GenericChildContent
- ChildComponent_GenericWeaklyTypedAttribute_TypeInference
- ChildComponent_GenericWeaklyTypedAttribute
- ChildComponent_Generic_TypeInference_Multiple
- ChildComponent_Generic_TypeInference
- ChildComponent_Generic
- ChildComponent_InFunctionsDirective
- ChildComponent_InLocalFunction
- ChildComponent_MultipleGenerics_TypeInference
- ChildComponent_MultipleGenerics
- ChildComponent_NonGenericParameterizedChildContent_TypeInference
- ChildComponent_Simple
- ChildComponent_WithChildContent
- ChildComponent_WithElementOnlyChildContent
- ChildComponent_WithExplicitChildContent
- ChildComponent_WithExplicitEventHandler
- ChildComponent_WithExplicitGenericChildContent
- ChildComponent_WithExplicitStringParameter
- ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent
- ChildComponent_WithGenericChildContent_SetsParameterName
- ChildComponent_WithGenericChildContent
- ChildComponent_WithLambdaEventHandler
- ChildComponent_WithNonPropertyAttributes
- ChildComponent_WithPageDirective
- ChildComponent_WithParameters
- ChildComponent_WithWeaklyTypeEventHandler
- ChildContent_FromAnotherNamespace
- ComponentParameter_TypeMismatch_ReportsDiagnostic
- ComponentWithBooleanParameter_Minimized
- ComponentWithBooleanParameter
- ComponentWithConstrainedTypeParameters_WithSemicolon
- ComponentWithConstrainedTypeParameters
- ComponentWithDecimalParameter
- ComponentWithDynamicParameter
- ComponentWithTupleParameter
- ComponentWithTypeParameterArray
- ComponentWithTypeParameterValueTupleGloballyQualifiedTypes
- ComponentWithTypeParameterValueTuple_ExplicitGenericArguments
- ComponentWithTypeParameterValueTuple
- Component_ComplexContentInAttribute_02
- Component_ComplexContentInAttribute_03
- Component_ComplexContentInAttribute
- Component_IgnoresStaticAndAliasUsings
- Component_MatchingIsCaseSensitive
- Component_MultipleComponentsDifferByCase
- Component_NamespaceDirective_InImports
- Component_NamespaceDirective_OverrideImports
- Component_TextTagsAreNotRendered
- Component_WithCssScope
- Component_WithEditorRequiredChildContent_NoValueSpecified
- Component_WithEditorRequiredChildContent_ValueSpecifiedAsText_WithoutName
- Component_WithEditorRequiredChildContent_ValueSpecified_WithoutName
- Component_WithEditorRequiredChildContent_ValueSpecified
- Component_WithEditorRequiredNamedChildContent_NoValueSpecified
- Component_WithEditorRequiredNamedChildContent_ValueSpecified
- Component_WithEditorRequiredParameter_NoValueSpecified
- Component_WithEditorRequiredParameter_ValueSpecifiedUsingBind
- Component_WithEditorRequiredParameter_ValueSpecified
- Component_WithEditorRequiredParameter_ValuesSpecifiedUsingSplatting
- Component_WithEscapedParameterName
- Component_WithFullyQualifiedTagNames
- Component_WithImplicitLambdaEventHandler
- Component_WithImportsFile
- Component_WithInitOnlyParameter
- Component_WithKey_WithChildContent
- Component_WithKey
- Component_WithNamespaceDirective
- Component_WithNullableActionParameter
- Component_WithNullableRenderFragmentParameter
- Component_WithRef_Nullable_Generic
- Component_WithRef_Nullable
- Component_WithRef_WithChildContent
- Component_WithRef
- Component_WithSplat_ExplicitExpression
- Component_WithSplat_GenericTypeInference
- Component_WithSplat_ImplicitExpression
- Component_WithSplat
- Component_WithUsingDirectives_AmbiguousImport
- Component_WithUsingDirectives
- Component_WithWriteOnlyParameter
- DuplicateComponentParameters_IsAnError_BindMessageChanged
- DuplicateComponentParameters_IsAnError_BindMessageExpression
- DuplicateComponentParameters_IsAnError_BindMessage
- DuplicateComponentParameters_IsAnError_Multiple
- DuplicateComponentParameters_IsAnError_WeaklyTyped
- DuplicateComponentParameters_IsAnError
- Duplicate_RenderMode
- EmptyRootNamespace
- EventCallbackOfT_Array
- EventCallbackOfT_GenericComponent_ExplicitType_MethodGroup
- EventCallbackOfT_GenericComponent_ExplicitType
- EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_01
- EventCallbackOfT_GenericComponent_MissingTypeParameterBinding_02
- EventCallback_CanPassEventCallbackOfT_Explicitly
- EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT
- EventCallback_CanPassEventCallbackOfT_Implicitly_Action
- EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask
- EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask
- EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch
- EventCallback_CanPassEventCallback_Explicitly
- EventCallback_CanPassEventCallback_Implicitly_ActionOfObject
- EventCallback_CanPassEventCallback_Implicitly_Action
- EventCallback_CanPassEventCallback_Implicitly_FuncOfTask
- EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask
- FormName_Component_Generic_RazorLangVersion7
- FormName_Component_Generic
- FormName_Component_RazorLangVersion7
- FormName_Component
- FormName_Nested
- GenericBindToGenericComponent_ExplicitType_WithGetSet_Action
- GenericBindToGenericComponent_ExplicitType_WithGetSet_EventCallback
- GenericBindToGenericComponent_ExplicitType_WithGetSet_Function
- GenericComponentBindToGenericComponent_ExplicitType_WithAfter_Action
- GenericComponentBindToGenericComponent_InferredType_WithAfter_Action
- GenericComponentBindToGenericComponent_InferredType_WithGetSet_Action
- GenericComponentBindToGenericComponent_InferredType_WithGetSet_EventCallback
- GenericComponentBindToGenericComponent_InferredType_WithGetSet_Function
- GenericComponentMultipleTypeParamUsage
- GenericComponentTypeParamUsageWithImplicitExpression2
- GenericComponentTypeParamUsageWithImplicitExpression
- GenericComponentTypeUsageWhitespace
- GenericComponentTypeUsageWithGenericType
- GenericComponentTypeUsageWithInference
- GenericComponentTypeUsage
- GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeExplicit
- GenericComponent_GenericEventCallbackWithGenericTypeParameter_NestedTypeInference
- GenericComponent_GenericEventCallbackWithGenericTypeParameter_TypeInference
- GenericComponent_GenericEventCallbackWithNestedGenericTypeParameter_TypeInference
- GenericComponent_GenericEventCallback_TypeInference
- GenericComponent_NestedGenericEventCallback_TypeInference
- GenericComponent_NonGenericEventCallback_TypeInference
- GenericComponent_NonGenericParameter_TypeInference
- GenericComponent_NonPrimitiveTypeRenderFragment
- GenericComponent_NonPrimitiveType
- GenericComponent_TypeParameterOrdering
- GenericComponent_UnmanagedConstraint
- GenericComponent_WithComponentRef_CreatesDiagnostic
- GenericComponent_WithComponentRef_TypeInference_CreatesDiagnostic
- GenericComponent_WithFullyQualifiedTagName
- GenericComponent_WithKey_TypeInference
- GenericComponent_WithKey
- GenericInference_DynamicallyAccessedMembers_01
- GenericInference_DynamicallyAccessedMembers_02
- GenericTypeCheck
- ImplicitStringConversion_ParameterCasing_AddAttribute
- ImplicitStringConversion_ParameterCasing_AddComponentParameter
- ImplicitStringConversion_ParameterCasing_Bind_02
- ImplicitStringConversion_ParameterCasing_Bind_03
- ImplicitStringConversion_ParameterCasing_Bind
- ImplicitStringConversion_ParameterCasing_Multiple
- InvalidCode_EmptyTransition
- LeadingWhiteSpace_WithComponent
- Legacy_3_1_LeadingWhiteSpace_WithComponent
- Legacy_3_1_TrailingWhiteSpace_WithComponent
- MultipleChildContentMatchingComponentName
- MultipleExplictChildContent
- NamespaceWithSurrogatePair
- NonGenericComponent_WithGenericEventHandler
- RazorTemplate_AsComponentParameter_MixedContent
- RazorTemplate_ContainsComponent
- RazorTemplate_FollowedByComponent
- RazorTemplate_Generic_AsComponentParameter
- RazorTemplate_NonGeneric_AsComponentParameter
- Regression_597
- Regression_609
- Regression_772
- Regression_773
- RenderMode_Attribute_With_Existing_Attributes
- RenderMode_Attribute_With_Expression
- RenderMode_Attribute_With_SimpleIdentifier
- RenderMode_Child_Components
- RenderMode_Multiple_Components
- RenderMode_With_Null_Nullable_Disabled
- RenderMode_With_Null_Nullable_Enabled
- RenderMode_With_Nullable_Receiver
- RenderMode_With_Ternary
- RenderMode_With_TypeInference
- TrailingWhiteSpace_WithComponent
- VoidTagName_FullyQualified
- VoidTagName_SelfClosing
- VoidTagName
- Microsoft.CodeAnalysis.Razor.Compiler/src/Language
- Components
- Intermediate
- Razor
- src
- Microsoft.CodeAnalysis.Razor.Workspaces
- DocumentExcerpt
- Formatting/Passes
- GoToDefinition
- Remote
- SemanticTokens
- Microsoft.CodeAnalysis.Remote.Razor
- DocumentMapping
- FindAllReferences
- GoToDefinition
- Microsoft.VisualStudio.LanguageServices.Razor
- DynamicFiles
- LanguageClient
- test
- Microsoft.VisualStudio.LanguageServices.Razor.Test
- Cohost
- DynamicFiles
- LanguageClient
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
301 files changed
+2505
-524
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
0 commit comments