Skip to content

Conversation

@akshita31
Copy link
Contributor

@akshita31 akshita31 commented May 16, 2018

Clear the Omnisharp log channel when we restart the server to avoid having to navigate through logs from the previous start.

A relevant unit test also added to the OmnisharpChannelObserver

@codecov
Copy link

codecov bot commented May 16, 2018

Codecov Report

Merging #2318 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2318      +/-   ##
==========================================
+ Coverage   59.75%   59.79%   +0.04%     
==========================================
  Files          83       83              
  Lines        3764     3768       +4     
  Branches      547      547              
==========================================
+ Hits         2249     2253       +4     
+ Misses       1348     1347       -1     
- Partials      167      168       +1
Flag Coverage Δ
#integration 51.04% <87.5%> (+0.02%) ⬆️
#unit 82.82% <100%> (+0.35%) ⬆️
Impacted Files Coverage Δ
src/omnisharp/loggingEvents.ts 100% <100%> (ø) ⬆️
src/observers/OmnisharpChannelObserver.ts 100% <100%> (+20%) ⬆️
src/omnisharp/server.ts 72.04% <100%> (+0.1%) ⬆️
src/features/commands.ts 29.47% <100%> (ø) ⬆️
src/omnisharp/delayTracker.ts 68.42% <0%> (-5.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af2cfc2...f0a38be. Read the comment docs.


try {
let launchResult = await launchOmniSharp(cwd, args, launchInfo, this.platformInfo, options);
this.eventStream.post(new ObservableEvents.ShowOmniSharpChannel());
Copy link
Member

Choose a reason for hiding this comment

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

This would show the OmniSharp log everytime the user launches C# for VS Code? I think that would be very annoying. I would recommend against that behavior.

Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

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

I don't think we should be showing the OmniSharp Log channel everytime the user launches C# for VS Code.

EDIT: To be clear, I'm fine with clearing the log when restarting. But showing the log every time OmniSharp launches will likely be very annoying to users.

@akshita31
Copy link
Contributor Author

akshita31 commented May 16, 2018

@DustinCampbell Understood your concern. Removed the show thing. Now this PR just clears the omnisharp channel whenever there is a restart.

@akshita31 akshita31 changed the title Show the OmniSharp channel when starting the server Clear the OmniSharp channel before restarting the server May 17, 2018
Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

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

Looks good!

@akshita31 akshita31 merged commit 4c35ca5 into dotnet:master May 17, 2018
@akshita31 akshita31 deleted the server_restart branch May 17, 2018 22:39
@filipw
Copy link
Contributor

filipw commented May 18, 2018

thank you - this is a very welcome change!

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