这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@brettfo
Copy link
Member

@brettfo brettfo commented Aug 26, 2019

This allows us to return proper System.Objects which means we get the default formatting for IEnumerable<T>.

image

This included an interesting bug where the directive/magic preprocessor will accept a left bracket followed by any non-whitespace characters then a right bracket bracket (e.g., \[[^\s]+\]) and return those as a System.CommandLine directive, which is exactly what we don't want for F# where [1;2;3;4] is a valid List<'t>. To get around that I added some checks to ensure that the magic string parser ignores directives. I also filed dotnet/command-line-api#625 to track future work.

Still to figure out: how to consume the helper functions/formatters. E.g., a[href: "some-url"]("click me") won't work in F# like it does in C#.


// reply ok
var executeReplyPayload = new ExecuteReplyOk(executionCount: openRequest.ExecutionCount);
if (InFlightRequests.TryRemove(codeSubmissionEvaluated.Command, out var openRequest))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it's working around a bug? What's the case where we do multiple evaluations of the same command?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hit this as well. There can be multiple replies to a given a command and if one arrives after the command is marked as completed, there was a NullReferenceException here.

@brettfo brettfo merged commit d5afefc into dotnet:master Aug 26, 2019
@brettfo brettfo deleted the fsharp-script branch August 26, 2019 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants