-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Is your feature request related to a problem? Please describe.
I was implementing nested-language support in FSAC by checking if parameters of methods are decorated with System.Diagnostics.CodeAnalysis.StringSyntaxAttribute, and I was doing this by
- getting the ident for the method being called
- getting the symbol use for that ident
- getting the member, function, or value for that symbol use
- investigating the parameter list for that MFV
- checking the attributes on the parameter in the correct position
However, FSharpParameter seems to always have an empty .Attributes member, as shown in
fsharp/src/Compiler/Symbols/Symbols.fs
Lines 2077 to 2079 in 26b8772
| // INCOMPLETENESS: Attribs is empty here, so we can't look at attributes for | |
| // either .NET or F# parameters | |
| let argInfo: ArgReprInfo = { Name=nmOpt; Attribs=[]; OtherRange=None } |
Describe the solution you'd like
I'd like .Attributes to have the list of attributes for that parameter, or have a method that could be called to lazily-calculate the list if that would increase memory usage too much.
Describe alternatives you've considered
Some horrific hacking to use reflection-only loads to try and load and investigate the matching parameter.
Additional context
Here's the tracking issue in Ionide for adding this nested-language feature: ionide/ionide-vscode-fsharp#1912
Metadata
Metadata
Assignees
Type
Projects
Status