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

Refactoring status using rxjs #2133

Merged
merged 65 commits into from
Apr 5, 2018
Merged

Conversation

akshita31
Copy link
Contributor

@akshita31 akshita31 commented Mar 23, 2018

Fixes: #2146
Changes introduced:

  1. Removed status.ts and divided it into 4 observers:
  • InformationMessageObserver
  • WarningMessageObserver
  • ProjectStatusObserver
  • OmnisharpStatusBarObserver
    Each of these observers handles a separate responsibility
  1. The extension was popping up a single statusBarItem which showed both the OmnisharpServerStatus and the status of the currently open project in the workspace. We have now made two separate status bar items for these.

  2. The adding of the listeners and the corresponding disposables for the events like - OnServerStart, OnServerStop, ProjectAdded, etc (done previously in status.ts) are now handled directly in server.ts.

  3. For the events in which a project changes, specifically- ProjectAdded, ProjectRemoved and ProjectChange the updateTracker listener is being used to debounce the update project request using rx debounce( We need the debounce with leading: true, so the logic with updateTracker is implemented so that the first request will always be serviced and the corresponding requests are debounced)

  4. The logic where the status bar depended on the ActiveTextEditor has been removed because we intend the status bar to be a workspace element and not depending on the currently opened document.

  5. OmnisharpStatusBarObserver deals with all the Omnisharp events like Server Start, Server Stop, Install, etc. The corresponding status bar element has been moved to the left side of the editor window. It is a clickable object and on click will show the Omnisharp Log channel.

running

  1. ProjectStatusBarObserver deals with the project that has been selected and displays the name of the currently selected project or the "Select Project" option if there are multiple launch targets. Clicking this will provide the user the option to pick projects from the Command Palette. The "folder" icon is used to represent this element as shown below.

running

When a server stop event is created both these status bars are reset and hidden.

Corresponding tests have also been added for the observers.

src/main.ts Outdated
let informationMessageObserver = new InformationMessageObserver(getConfiguration, showInformationMessage, workspaceAsRelativePath);
eventStream.subscribe(informationMessageObserver.post);

let omnisharpStatusBar = new StatusBarItemAdapter(vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE));
Copy link

Choose a reason for hiding this comment

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

I wonder if there's something we could do to avoid having to create a closure to all the "real" vscode implementations. Maybe some kind of "vscode adapter"?

private subject: Subject<ObservableEvent.BaseEvent>;

constructor(private showWarningMessage: ShowWarningMessage<MessageItemWithCommand>, private executeCommand: ExecuteCommand<string>, scheduler?: Scheduler) {
this.subject = new Subject<ObservableEvent.BaseEvent>();
Copy link

Choose a reason for hiding this comment

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

In the future, when we add an option to suppress this message, which component will be responsible for reading the option?

Choose a reason for hiding this comment

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

The observer owns projecting the event into vscode, so it will be responsible for interpreting that configuration.

(selector: vscode.DocumentSelector, document: any): number;
}

export class OmnisharpStatusBarObserver {
Copy link

Choose a reason for hiding this comment

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

It's hard tounderstand from the names how this is different from the thing above it.

this.render();
break;
case ObservableEvent.ActiveTextEditorChanged.name:
this.render();
Copy link

Choose a reason for hiding this comment

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

What does it mean to call render without setstatus? Blank the status bar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Status class is a wrapper around the StatusBarItem. There are two possible values that we might display in the StatusBarItem object - defaultStatus or projectStatus. On calling render we check whether any of those values are set for the class and if they are then we display them according to some logic.

}

private updateProjectInfo = (server: OmniSharpServer) => {
serverUtils.requestWorkspaceInformation(server).then(info => {
Copy link

Choose a reason for hiding this comment

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

This method looks like a copypasta from somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have removed the status.ts and moved its functionality across three files and this is one of them.

let document = activeTextEditor.document;
let status: Status;

if (this.projectStatus && this.match(this.projectStatus.selector, document)) {
Copy link

Choose a reason for hiding this comment

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

I don't understand what this does. What is match?

Copy link

Choose a reason for hiding this comment

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

These delegates are kind of confusing.

Copy link

Choose a reason for hiding this comment

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

Maybe there could be an observer that sits at the VS Code layer and doesn't take delegates? Of course, it would only be integration test-able.

@@ -1,270 +0,0 @@
/*---------------------------------------------------------------------------------------------

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

😄

private subject: Subject<ObservableEvent.BaseEvent>;

constructor(private showWarningMessage: ShowWarningMessage<MessageItemWithCommand>, private executeCommand: ExecuteCommand<string>, scheduler?: Scheduler) {
this.subject = new Subject<ObservableEvent.BaseEvent>();

Choose a reason for hiding this comment

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

subject is not a very informative name here.

public post = (event: ObservableEvent.BaseEvent) => {
switch (event.constructor.name) {
case ObservableEvent.OmnisharpServerOnError.name:
this.subject.onNext(event);

Choose a reason for hiding this comment

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

Maybe this.projectErrorDebouncer.onNext(...)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed it as warningMessageDeboucer. Does that seem alright ?

@@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------------------------

Choose a reason for hiding this comment

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

How about we call this the ShowWarningMessageObserver?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

export class OmnisharpServerUnresolvedDependencies implements BaseEvent{
constructor(public unresolvedDependencies: protocol.UnresolvedDependenciesMessage) { }
export class OmnisharpServerUnresolvedDependencies implements BaseEvent {
constructor(public unresolvedDependencies: protocol.UnresolvedDependenciesMessage, public server: OmniSharpServer, public eventStream: EventStream) { }

Choose a reason for hiding this comment

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

This change is temporary, right? We'll get rid of the extra parameters soon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we will use the vscode api's to do the restore then we can get rid of this here.

return;
}
}

this.eventStream.post(new OmnisharpInitialisation(new Date(), solutionPath));
this.eventStream.post(new ObservableEvents.OmnisharpInitialisation(new Date(), solutionPath));

Choose a reason for hiding this comment

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

Why do we need to add the ObservableEvents specifier everywhere? It makes the code much more busy..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The import from logging events was becoming too long so I changed that to import * as ObservableEvents from loggingEvents . What do you think is better ?

@colombod
Copy link
Member

colombod commented Apr 5, 2018

Looks good to me

Copy link

@rchande rchande left a comment

Choose a reason for hiding this comment

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

Looks pretty good, some questions.

import * as ObservableEvent from "../omnisharp/loggingEvents";
import { vscode } from '../vscodeAdapter';

export class InformationMessageObserver {
Copy link

Choose a reason for hiding this comment

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

Why does the info message observer not need to debounce when the warning one does?
Also, why is there not an error message observer (maybe it was added in another PR)?

Generally, it seems like we might be painting ourselves into a corner here. If for some reason, we want to be able to configure the errorlevel of a message, we now have to go teach each error level observer how to print that message. Maybe it would be clearer to only have one WindowPostMessageObserverThingy and have it know how to translate event -> VS Code Warning level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The error event and MSbuildDiagnostics event shows the warning message hence they are both present in the warning message observer


constructor(private vscode: vscode, scheduler?: Scheduler) {
this.warningMessageDebouncer = new Subject<BaseEvent>();
this.warningMessageDebouncer.debounce(1500, scheduler).subscribe(async event => {
Copy link

Choose a reason for hiding this comment

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

We've gotten feedback that having a ton of these messages appear is annoying. The command we have here doesn't appear to scroll the output to a specific location. Instead of "Debounce", should we change this observer to just raise one notification if it gets that event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But if the server restarts then ?

Copy link

Choose a reason for hiding this comment

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

Ah, this was me misunderstanding debouce. Looks good to me.

private _readLine: ReadLine;
private _disposables: vscode.Disposable[] = [];
private _disposables: CompositeDisposable = new CompositeDisposable(Disposable.empty);
Copy link

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are trying to remove the dependency on vscode wherever possible. So here we are using the Rx disposables instead.

Copy link

Choose a reason for hiding this comment

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

I meant, why is this initialized to a empty composite disposable when line 286 replaces it with a real disposable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right. Removed the empty initialization.

this._disposables.pop().dispose();
// we could move this to a project updated observer and pass the server there. But we will need the event stream also there :(
private updateTracker = () => {
if (this.firstUpdateProject) {
Copy link

Choose a reason for hiding this comment

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

I don't really understand what this is trying to? The first time, it just sends the message, but subsequent project updates are debounced?

Copy link
Contributor Author

@akshita31 akshita31 Apr 5, 2018

Choose a reason for hiding this comment

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

The first time when we get one of the three events - onProjectAdded , onProjectChanged and onProjectRemoved , the updateProjectInfo function is invoked directly. After this if we get any of the events, then we invoke the updateProjectInfo function via the debouncer. This is the functional equivalent of lodash.debounce with leading: true - https://css-tricks.com/debouncing-throttling-explained-examples/#article-header-id-1

Copy link

Choose a reason for hiding this comment

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

What's the consequence if you always debounce? The first message is delayed by debounce interval?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we keep getting the request then the status bar will not be displayed until there is a silence of 1500 ms. This way with leading true, we service the first request that we get so status bar shows something, and then when for the next requests we see a silence of 1500ms then we service them. Basically it is just so that we have something to display for the first time.

Copy link

Choose a reason for hiding this comment

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

Can you remind me what actual status/message this is displaying? If we can make this code simpler and the consequence is that a message gets delayed by 1.5 seconds, I would be in favor of that. Up to you though...

@@ -84,12 +85,17 @@ export class OmniSharpServer {

private _omnisharpManager: OmnisharpManager;
private eventStream: EventStream;
private updateProjectDebouncer: Subject<ObservableEvents.ProjectModified>;
private firstUpdateProject: boolean;
Copy link

Choose a reason for hiding this comment

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

Just initialize this here.


while (this._disposables.length) {
this._disposables.pop().dispose();
// we could move this to a project updated observer and pass the server there. But we will need the event stream also there :(
Copy link

Choose a reason for hiding this comment

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

I don't understand this comment, but I agree with the :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I had added in while working but forgot to delete :(

Copy link

@rchande rchande left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments. Also, I just had the opportunity to learn a bunch about how debounce works :).

LGTM

@akshita31 akshita31 merged commit 4001e8e into dotnet:master Apr 5, 2018
@akshita31 akshita31 deleted the statusRefactor branch April 5, 2018 23:18
TheRealPiotrP pushed a commit that referenced this pull request Apr 27, 2018
* Initial manual validation plan

* Add info about unity

* Enable usage of omnisharp.path option for downloading multiple versions of omnisharp (#2028)

* Enable usage of multiple versions

* Either load the server from a path or download the version packages

* Tests for the package creator

* Added null check and removed semver check in package creator

* Test for the experiment omnisharp downloader

* Added test for package manager

* Code clean up

* Added null or empty check for version

* Changes

* Modified the description

Put the clean up logic in the teardown function

* Remove comment

* Remove unnecessary usage

* CR comments

* Removed experimental

* Modified launcher

* Removed experimental

* Modified tests

* Modified package description to include version information

* Renamed launch path

* Add more tests

* Changed the description in package.json

* "Run All Tests" and "Debug All Tests" (#1961)

* Run All Tests Running But Building repeatedly

* Disposable variable for run all test

* Added code for debug all tests

* Code Cleaning

* Run all Tests running - Better logs required

* Run Tests running, all output shown at the end of all the tests

* Renamed variable to methodsInClass

* Changes for Debug All Tests

* Changes for debug tests request

* Debug All Tests running

* Added common helpers for single test and all test functions

* Improved logs for Run All Tests

* Changes to get only 1 response for a set of methods

* Extracted a common helper to get the test feature

* Resolved review comments

* Changes to not show this change for legacy projects

* Renamed incorrect variable

* Removing foreach for proper order of execution

* Remove unnecessary import

* Do not show the festure for legacy projects

* Make hover test run by adding the file in the project (#2058)

* Added hover.cs file

* Not requiring server restart

* Using Structured Documentation for Signature Help and improving Parameter Documentation (#1958)

* Structured Documentation in Signature Help

* Code clean up

*  Using only summary of the documentation

* Code clean up

* Documentation for parameters showing in signature help

* Removing unnecesaary import

* Using interploated string and fixed spacing

* Parameter Documentation using interpolated text

* Added tests

* Enable download and usage of latest version of omnisharp (#2039)

* Enable usage of multiple versions

* Either load the server from a path or download the version packages

* Tests for the package creator

* Added null check and removed semver check in package creator

* Test for the experiment omnisharp downloader

* Added test for package manager

* Code clean up

* Added null or empty check for version

* Changes

* Modified the description

* Put the clean up logic in the teardown function

* Remove comment

* Remove unnecessary usage

* CR comments

* Removed experimental

* Modified launcher

* Removed experimental

* Modified tests

* Modified package description to include version information

* Renamed launch path

* Add more tests

* Changed the description in package.json

* Getting latest version info

* Refactored code and added tests

* Remove unnecessary using

* CR comments

* Use common function for latest download

* Add new line

* Resolve binaries on linux

* Copy pacakges by value

* Renamed experimentalId and some methods

* Moved status item out of method and added version to message

* Fix typo (#2066)

* Fix year in changelog (#2068)

Fixed wrong year in changelog

* Formatting for better display structure

* Move to const fields in server

* Make methods private

* Move chai-as-promised to devDependencies

* Removed unnecessary function

* Insert new debugger with support for Symbol Server and Source Link (#2070)

* launch.json schema changes and documentation

This has the new launch.json schema to support XPlat symbols

* Update debugger packages

* Update CHANGELOG.md with debugger change

* Modified test description

* Update .editorconfig JSON rules (#2063)

Last week I ran into yet another time when something added a BOM to one of our json files and broke things. This adds some .editorconfig rules for .json to try and prevent such things.

While I was at it, I also wanted to switch the indent size for src/tools/*.json to be '2' so that it is consistent with other json schema files the debugger owns.

* Updated to reflect limited Desktop CLR support (#2046)

* Updated to reflect limited Desktop CLR support

* Fixed grammatical error

* Refactor CSharpExtDownloader to use the extracted helper functions (#2072)

* Refactor downloader
* Renamed method and corrected the position of appendLine
* Modified GetStatus and the Status object to append the dispose method

* Added settings file

* Emphasize test codelens

* Add another bullet point

* Add more details about signature help and tests codelenses

* Fix typo

* Update Changelog and test-plan for multiple download of omnisharp (#2082)

* Update changelog and test-plan for multiple download of omnisharp

* Add mocha+wallaby tests (#2091)

* Add mocha+wallaby tests

eventually the feature tests should be removed and most of our tests should become unit tests that are runnable from the command line or via wallaby.

npm run tdd will enable using mocha's command line tdd capability

* Fix `tdd` command

* Fix test paths

* move to tslint-no-unused-expression-chai

The package was already installed, but not used. This makes our tests that use chai.should() pass tslint checks

* Add Architecture check in AdapterExectuableCommand (#2094)

* Add Architecture check in AdapterExectuableCommand

x86 messages only show during the first installation. But it still
registeres the vsdbg-ui.exe command. This adds a check so it will
error instead of returning the command.

* Moving arch check into completeDebuggerInstall

* Beta1 -> Beta2

* Remove angle brackets in ChangeLog (#2099)

* Add product-wide code coverage + codecov.io integration (#2101)

Add product-wide code coverage + codecov.io integration

Several new scripts were added:

npm run cov:instrument: rebuilds your sources, then instruments them for coverage. Subsequent 

npm run test will generate coverage data into the .nyc_output directory

npm run cov:merge-html: merges all reports from .nyc_output and puts a locally viewable coverage report into coverage directory

* Refactor logger, reporter and channel into a unified EventStream using Rx Observable (#2084)

* Changes to refactor logging in server

* Adding packages

* Changes

* Remove reporter from CSharpExtDownloader

* remove telemtery reporter from server.ts

* remove reporter from definitionProvider

* Remove reporter from dotnetTest.ts

* Debugger Activation + Commands

* reduce message types

* remove reporter from commands.ts

* remove channel from  status.ts

* Remove reporter & logger from extension.ts

* Build issues

* Add missing rx dependency

* Changed to download progress

* Removed using and pass platformInfo

* Moved files in observer folder

* Renamed the files and added omnisharp channel observer

* Remove unnecessary format

* Changes in main.ts

* Remove channel from global declaration

* Preserving the context in onNext invocations

* Pulled platformInfo out of server

* Remove unnecessary variable

* Formatting

* Renamed observers

* Add mocha+wallaby tests

eventually the feature tests should be removed and most of our tests should become unit tests that are runnable from the command line or via wallaby.

npm run tdd will enable using mocha's command line tdd capability

* Code clean up

* Fix `tdd` command

* Fix test paths

* Add initial DotnetChannelObserver test

* Testing the download messages

* Remove logger from requestQueue.ts

* Fix builds

* Use package manager factory

* Remove Lines

* Remove extra appendLine

* Added test for csharp logger and channel

* Extracted base class for observers

* Test having dependency on vscode

* vscode adapter changes

* Changes for adapter

* Refactored Omnisharp Manager

* Moved from interfaces to classes

* Renamed onNext to post

* Created class EventStream

* Removed comment

* Added missing break

* Added test for Omnisharp Logger

* Test for OmnisharpLoggerObserver

* Test for telemetry reporter observer

* Added test for all the observers

* minor nits

* Changes

* Remove unnecessary imports

* remove import

* Modified failing test

* Make tests pass

* Renamed platformInfo

* CR feedback

* 2 -> 3

* Fix codecov integration (#2108)

Fix js->ts coverage map transformation in Travis CI where `node` is not on the path.

* enable codecov on unit tests (#2118)

* enable codecov on unit tests

* rename coverage files for uniform globbing

* Validate Indentation for OmnisharpProcess messages (#2119)

* Clean up signature help test (#2117)

* Added parameter

* modifications

* Cleaned up tests

* Changed test codelens casing (#2077)

* CodeCov flags (#2125)

Lights up integration test coverage and splits reporting data between unit & integration tests

* Update project npm dependencies (#2126)

* low-risk package updates

* high-risk package updates

* disable uninstrumented test pass (#2127)

* Fix size (#2142)

* 1.15.0-beta4 (#2143)

* Verify vsix size before release (#2144)

* Verify vsix size before release

* Remove istanbul from shipping payload

* Use the size appropriately in the release test (#2145)

* Fix offline packaging using event stream (#2138)

* Creating a new eventStream

* invokeNode

* Artifact tests

* Directing the vsix files to a temp folder

* Changes to travis to run release tests on release only

* if statement

* Convert gulpfile to ts

* Add bracket

* Clean up the observer tests for better readability (#2157)

* CsharpLoggerObserver

* dotnetchannelobserver

* TelemetryObserver

* DebugModeObserver

* Correct message in the debug observer

* Refactoring status using rxjs (#2133)

* hack

* Refactored status into 4 separate observers

* Resolved warning and information messages

* Deleted status.ts

* Changes to retain this context

* Created fascade for statusbar and texteditor

* Subscribe to event stream

* Working!

* Nits

* Mocking warning message

* Tried mocking setTimeOut

* warning message changes

* warning message correct definition

* virtual time running

* done called multiple time

* renamed observer and subject

* changes

* some changes

* refactor^2

* merge conflicts

* using rx debounce

* Warning Message Observer tests

* Remove loadsh.debounce and renamed observer

* Move the workspace info invocation to server

* Clean up

* More test to statusBarObserver

* Clean up tests

* Fixed ttd

* Use vscode commands instead of calling into commands.ts

* Added test for information message observer

* Tests for status bar obsever

* project status observer

* Changes to show two observers

* some more changes

* Lot of questions!

* build issues

* Remove usings

* comments

* Remove unnecessary cases

* Changes

* Remove usings

* Dipsose the disposables after the server stop event

* Remove the cake thing

* Project Status Bar

* Clean up the tests

* Changed to dcoument

* Remove unnecessary functions from the adapter

* remove unnecessary change

* Remove some changes

* changes

* Test for server error

* Removed comment and modified the initialisation

* Empty disposable

* Corrected the usage of the disposables

* Added comments for debouncer

* disposable try

* Test the vsix, not the build layout (#2156)

The VSCode C# Extension build process follows the VS Code docs and runs tests directly inside of its repo root. This unfortunately gives a false sense of security because bugs can be introduced during VSIX packaging [particularly due to missing content in node_modules or excluded via .vscodeignore].

This change addresses this problem by moving our CI tests to execute the VSIX instead of the build's intermediate artifacts. Specifically:

build the vsix
unpackage the vsix
instrument the unpackaged vsix
run tests with VS Code Host pointing to the unpackaged vsix
This makes our CI tests ~= to the user's runtime experience and will greatly help us with size reduction efforts.

To support this change, I also moved our build system from package.json to Gulp. This makes the build scripts significantly easier to understand, provides intellisense for build scripts, and build-time type checking for their contents.

I also strengthened the repo's use of .vscodeignore by creating a copy of the file for each scenario [online packages and offline packages]. The new gulp packaging scripts take advantage of these files to produce packages with predictable contents regardless of when packaging occurs. [small caveat, @akshita31 will be adding a test that validates that net-new content does not start sneaking into the vsix package].

* Enable `noImplicitAny` and `alwaysStrict` in `tsconfig.json (#2159)

Along the way, fixed a few bugs that were in place due to implicit anys. Also removed dependency on deprecated vscode API.

* tsconfig.json: noUnusedLocals, noFallThroughCaseInSwitch, tslint.json: promise-function-async (#2162)

Adds noUnusedLocals to tsconfig.json to keep our sources clean
Adds noFallThroughCaseInSwitch in tsconfig.json to prevent unintended switch behavior
Adds promise-function-async to tslint.json to force all async functions to be marked as async. This is a building block towards eliminating promises in favor of async/await.

* Eliminate Thennable<any> (#2163)

Provides strong typing for the repo's Thennables. This is a step towards eliminating promises and will provide compiler support for validating that the refactored code has not changed its final return type.

* promise to await packaging tasks (#2164)

* Remove the status handling from the package manager (#2160)

* Changes to remove status from packages.ts

* Tests failing

* Added tests

* Used tooltip and changed flame color

* fix merge problems

* PR feedback

* Removed implicit any

* Changes

* Update the links to the Source Link spec (#2170)

This updates the links we had to the Source Link spec to point at the more official version.

* Make the server and the downloader rely on the vscode adapter (#2167)

* Moving fakes to testAssets

* Change the import for fakes.ts

* Test Assets in feature tests

* Remove vscode dependency from server.ts

* Make the downloading stuff use vscode adapter

* Remove vscode as a property

* make test package json a field

* Run release test only on release (#2172)

* Show the channel on download start (#2178)

* Add "Launch Unit Test" option (#2180)

* unify rx usage to rxjs (#2168)

The current codebase uses both rx [v4] and rxjs [v5] implementations. This PR consolidates our use of rx onto the v5 libraries.

* Fix disposable (#2189)

* Divide the package manager into separate components (#2188)

* Feature tests running with refactored package manager

* Refactoring packages-1

* Test for the downloader running using the mock server

* Using network settings

* Changing the package path

* Dividing packages.ts into separate components

* use filter async

* Use tmpfile interface

* Check for the event stream

* Using FilePathResolver

* Remove using

* Testing for normal and fallback case working

* Resolve the paths

* Remove failing case

* package installer test-1

* Add package installer test

* Create tmp asset

* Package Downloader test refactored

* Rename files

* resolve compile issues

* Clean up installer

* Clean up the tests

* Rename packages

* Package installer test

* PR feedback

* Package Filter test

* Remove yauzl.d.ts

* Filter test

* Added test for invalid zip file

* method for getting the request options

* remove imports

* please resolve the path

* remove  latest in settings

* Package Manager test executing

* Use free port in package manager test

* Package Manager (using a https server running)

* using http mock server

* Downloader test running using free port

* Update ChangeLog for codelens and status bar (#2205)

* PR feedback

* Introduce OmniSharpLaunchInfo type

* Fix casing of 'OmniSharp' in user-facing error message

* Return both 'LaunchPath' and 'MonoLaunchPath' from OmniSharpManager

* move back to latest for O# release

* Refactor launcher and ensure that we launch on global Mono if possible

* Improve coverage a bit

* Use async/await in OmniSharpServer._start()

* Fix test

* Update debugger links for 1.15.0-beta5

This updates the debugger packages to the latest corelr-debug which is
now built on .NET Core 2.1 Preview 2.

* Update debugger changelog and debugger-launchjson.md for 1.15 (#2230)

- Add debugger items to the changelog
- Update debugger-launchjson.md to reference the new launchSettings.json feature.

* Mark the C# extension as non-preview (#2220)

* Mark the C# extension as non-preview

This changes the branding on the C# extension so that it is no longer labeled a 'preview'.

Two changes:
1. Change `preview` to `false` in package.json
2. Update the license that is used in official builds of the C# extension. This new EULA is no longer a pre-release EULA and it also has the latest text.

* Update README.md as well
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.

5 participants