Skip to content
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

Merged
merged 6 commits into from
May 4, 2017

Conversation

filipw
Copy link
Member

@filipw filipw commented May 2, 2017

Replaced InteractiveScriptGlobals with CommandLineScriptGlobals as CSX host object type. This is required, because CSI uses CommandLineScriptGlobals as host object for CSX script execution. InteractiveScriptGlobals is only used for REPL mode (reference), so naturally it makes sense to offer CommandLineScriptGlobals in OmniSharp intellisense.

As a bonus, I extracted some of the project/compilation set up logic from ScriptProjectSystem into ScriptHelper. 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.

"Prin$$";

var completions = await FindCompletionsAsync("dummy.csx", source);
ContainsCompletions(completions.Select(c => c.CompletionText), new[] { "Print", "PrintOptions" });
Copy link
Member Author

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

Copy link
Contributor

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! 👍

Copy link
Member Author

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" });
Copy link
Contributor

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! 👍

@filipw
Copy link
Member Author

filipw commented May 3, 2017

looks like I got into conflicts with myself 😄

@filipw filipw force-pushed the feature/globals branch from dd8e85b to 7e606d4 Compare May 4, 2017 14:29
@filipw
Copy link
Member Author

filipw commented May 4, 2017

I rebased this and resolved the conflicts - should be good to go

Copy link
Member

@david-driscoll david-driscoll left a 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

@DustinCampbell DustinCampbell merged commit 7bbb03c into OmniSharp:dev May 4, 2017
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