-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - DO NOT MERGE - Spike for F# support #392
base: 203
Are you sure you want to change the base?
Conversation
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="FSharp.Compiler.Service, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=3099b8d9d20e74bf"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mfilippov / @auduchinok Right now, I have referenced assemblies from the F# plugin manually. Support for "full plugins" (back-end and front-end) seem hard to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true. We don't have auto-reference for bundled plugins :( Maybe we should think about it.
{ | ||
foreach (var cronSuggestion in CronSuggestions) | ||
{ | ||
var token = context.TokenAtCaret as ITokenNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@auduchinok Seems completion can only be triggered right before a string, so {caret}"....."
triggers completion, "...{caret}...."
does not. This completion provider now assumes the quotes are always included. This means that on L98 below, I have to provide completion items with "
?
(I could be misunderstanding the PSI as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may have weird completion contexts in places where it wasn't previously possible to complete things. There're chances I'll need to fix it up a bit for completion inside strings to work as expected.
plugins = ['DatabaseTools', 'JavaScriptLanguage', 'terminal', 'restClient'] + extraPlugins | ||
plugins = ['DatabaseTools', 'JavaScriptLanguage', 'terminal', 'restClient', "com.jetbrains.rider.fsharp:$rider_fsharp_plugin_version"] + extraPlugins | ||
|
||
// HACK: -- Load F# plugin from custom repository (our local disk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mfilippov @auduchinok Same thing here, manually referencing the F# plugin on frontend from a custom disk-based URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix it we need to add two-phase build for bundled plugins. Or auto-upload to the gallery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-upload seems like an option, a least on the consuming side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to upload EAP builds to the gallery - I want to do the same with the Unity ReSharper plugin (not Rider). Nightly seems overkill - could we upload those to the snapshots repository?
@@ -0,0 +1,5 @@ | |||
<idea-plugin> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File needed to make F# an optional thing.
The other hack we had to do was add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, using F# plugin as a dependency for another plugin is really cool! I should probably try not to break APIs myself now. 😄
{ | ||
foreach (var cronSuggestion in CronSuggestions) | ||
{ | ||
var token = context.TokenAtCaret as ITokenNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may have weird completion contexts in places where it wasn't previously possible to complete things. There're chances I'll need to fix it up a bit for completion inside strings to work as expected.
...src/Azure.FSharp/FunctionApp/CodeCompletion/Rules/FSharpTimerTriggerCronArgumentsProvider.cs
Outdated
Show resolved
Hide resolved
{ | ||
if (element.Arguments.Count != 1) return; | ||
|
||
var resolveResult = element.ReferenceName.Reference.Resolve(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JFYI In F# plugin we sometimes tend to do checks that don't require resolve first, e.g. by checking names of references, to prevent calling FCS in other files where possible. Resolving type references should be fine, though, it's creating declared elements for functions/values what could be a problem in some cases.
...harper.Azure/src/Azure.FSharp/FunctionApp/Stages/Analysis/TimerTriggerCronProblemAnalyzer.cs
Outdated
Show resolved
Hide resolved
@maartenba 2021.1 F# plugin has completion context changes that should fix getting the literal for you. Please let me know if it doesn't work for your case. |
Have spent some time pair programming with @citizenmatt on basic completion/analyzer support for Azure Functions written in F#.
Cool pictures first
Behold!
Remarks second
This is by no means ready to merge, as there are some things that are hard/impossible right now. I'll annotate these in the PR and tag whoever I think this matters to.