-
Notifications
You must be signed in to change notification settings - Fork 416
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
replaced InteractiveScriptGlobals
with CommandLineScriptGlobals
as CSX host object type
#846
Conversation
"Prin$$"; | ||
|
||
var completions = await FindCompletionsAsync("dummy.csx", source); | ||
ContainsCompletions(completions.Select(c => c.CompletionText), new[] { "Print", "PrintOptions" }); |
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.
note that we are ahead of VS 😃
dotnet/roslyn#13886
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.
Yeah, VS Code scripting support is well ahead of VS. You're doing great work! 👍
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.
thanks! 😄
"Prin$$"; | ||
|
||
var completions = await FindCompletionsAsync("dummy.csx", source); | ||
ContainsCompletions(completions.Select(c => c.CompletionText), new[] { "Print", "PrintOptions" }); |
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.
Yeah, VS Code scripting support is well ahead of VS. You're doing great work! 👍
looks like I got into conflicts with myself 😄 |
I rebased this and resolved the conflicts - should be good to go |
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.
I guess I need to look at C# scripting some more huh? :p
Replaced
InteractiveScriptGlobals
withCommandLineScriptGlobals
as CSX host object type. This is required, because CSI usesCommandLineScriptGlobals
as host object for CSX script execution.InteractiveScriptGlobals
is only used for REPL mode (reference), so naturally it makes sense to offerCommandLineScriptGlobals
in OmniSharp intellisense.As a bonus, I extracted some of the project/compilation set up logic from
ScriptProjectSystem
intoScriptHelper
. This way, it can be used in the tests as well, to ensure that the test set up is using the same logic as the project system would. This makes tests more reliable than before, where the code to create CSX project/compilation was maintained in tests separately and needed to always stay in sync with project system to be trustworthy.