Skip to content

Commit 686b9ba

Browse files
committed
fix conflict
2 parents d787290 + cab094a commit 686b9ba

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

src/observers/CsharpChannelObserver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { BaseChannelObserver } from "./BaseChannelObserver";
7-
import { BaseEvent, InstallationFailure, DebuggerNotInstalledFailure, DebuggerPrerequisiteFailure, ProjectJsonDeprecatedWarning, DownloadStart } from "../omnisharp/loggingEvents";
7+
import { BaseEvent, InstallationFailure, DebuggerNotInstalledFailure, DebuggerPrerequisiteFailure, ProjectJsonDeprecatedWarning, PackageInstallStart } from "../omnisharp/loggingEvents";
88

99
export class CsharpChannelObserver extends BaseChannelObserver {
1010
public post = (event: BaseEvent) => {
1111
switch (event.constructor.name) {
12-
case DownloadStart.name:
12+
case PackageInstallStart.name:
1313
case InstallationFailure.name:
1414
case DebuggerNotInstalledFailure.name:
1515
case DebuggerPrerequisiteFailure.name:

src/omnisharp/loggingEvents.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export class OmnisharpLaunch implements BaseEvent {
3434
constructor(public monoVersion: string, public monoPath: string, public command: string, public pid: number) { }
3535
}
3636

37+
export class PackageInstallStart implements BaseEvent {
38+
constructor() { }
39+
}
40+
3741
export class PackageInstallation implements BaseEvent {
3842
constructor(public packageInfo: string) { }
3943
}

src/packageManager/PackageManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ import { AbsolutePathPackage } from "./AbsolutePathPackage";
1616
import { touchInstallFile, InstallFileType, deleteInstallFile, installFileExists } from "../common";
1717
import { InstallationFailure } from "../omnisharp/loggingEvents";
1818
import { mkdirpSync } from "fs-extra";
19+
import { PackageInstallStart } from "../omnisharp/loggingEvents";
1920

2021
export async function DownloadAndInstallPackages(packages: Package[], provider: NetworkSettingsProvider, platformInfo: PlatformInformation, eventStream: EventStream, extensionPath: string): Promise<void> {
2122
let absolutePathPackages = packages.map(pkg => AbsolutePathPackage.getAbsolutePathPackage(pkg, extensionPath));
2223
let filteredPackages = await filterPackages(absolutePathPackages, platformInfo);
2324

2425
if (filteredPackages) {
26+
eventStream.post(new PackageInstallStart());
2527
for (let pkg of filteredPackages) {
2628
let installationStage = "touchBeginFile";
2729
try {

test/unitTests/OmnisharpDownloader.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import MockHttpsServer from "./testAssets/MockHttpsServer";
1414
import {expect} from 'chai';
1515
import TestZip from "./testAssets/TestZip";
1616
import { createTestFile } from "./testAssets/TestFile";
17-
import { PackageInstallation, LogPlatformInfo, DownloadStart, DownloadSizeObtained, DownloadProgress, DownloadSuccess, InstallationStart, InstallationSuccess } from "../../src/omnisharp/loggingEvents";
17+
import { PackageInstallation, LogPlatformInfo, DownloadStart, DownloadSizeObtained, DownloadProgress, DownloadSuccess, InstallationStart, InstallationSuccess, PackageInstallStart } from "../../src/omnisharp/loggingEvents";
1818
import TestEventBus from "./testAssets/TestEventBus";
1919
import { testPackageJSON } from "./testAssets/testAssets";
2020

@@ -62,6 +62,7 @@ suite('OmnisharpDownloader', () => {
6262
let expectedSequence = [
6363
new PackageInstallation('OmniSharp Version = 1.2.3'),
6464
new LogPlatformInfo(new PlatformInformation("win32", "x86")),
65+
new PackageInstallStart(),
6566
new DownloadStart('OmniSharp for Windows (.NET 4.6 / x86), Version = 1.2.3'),
6667
new DownloadSizeObtained(testZip.size),
6768
new DownloadProgress(100, 'OmniSharp for Windows (.NET 4.6 / x86), Version = 1.2.3'),

test/unitTests/Packages/PackageManager.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { DownloadAndInstallPackages } from '../../../src/packageManager/PackageM
1313
import NetworkSettings from '../../../src/NetworkSettings';
1414
import { PlatformInformation } from '../../../src/platform';
1515
import { EventStream } from '../../../src/EventStream';
16-
import { DownloadStart, DownloadSizeObtained, DownloadProgress, DownloadSuccess, InstallationStart } from '../../../src/omnisharp/loggingEvents';
16+
import { DownloadStart, DownloadSizeObtained, DownloadProgress, DownloadSuccess, InstallationStart, PackageInstallStart } from '../../../src/omnisharp/loggingEvents';
1717
import MockHttpsServer from '../testAssets/MockHttpsServer';
1818
import { createTestFile } from '../testAssets/TestFile';
1919
import TestEventBus from '../testAssets/TestEventBus';
@@ -70,6 +70,7 @@ suite("Package Manager", () => {
7070

7171
test("Events are created in the correct order", async () => {
7272
let eventsSequence = [
73+
new PackageInstallStart(),
7374
new DownloadStart(packageDescription),
7475
new DownloadSizeObtained(testZip.size),
7576
new DownloadProgress(100, packageDescription),

test/unitTests/logging/CsharpChannelObserver.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
import { should, expect } from 'chai';
77
import { getNullChannel } from '../testAssets/Fakes';
88
import { CsharpChannelObserver } from '../../../src/observers/CsharpChannelObserver';
9-
import { InstallationFailure, DebuggerNotInstalledFailure, DebuggerPrerequisiteFailure, ProjectJsonDeprecatedWarning, BaseEvent, DownloadStart } from '../../../src/omnisharp/loggingEvents';
9+
import { InstallationFailure, DebuggerNotInstalledFailure, DebuggerPrerequisiteFailure, ProjectJsonDeprecatedWarning, BaseEvent, PackageInstallStart } from '../../../src/omnisharp/loggingEvents';
1010

1111
suite("CsharpChannelObserver", () => {
1212
suiteSetup(() => should());
1313
[
1414
new InstallationFailure("someStage", "someError"),
15-
new DownloadStart("somePackage"),
15+
new PackageInstallStart(),
1616
new DebuggerNotInstalledFailure(),
1717
new DebuggerPrerequisiteFailure("some failure"),
1818
new ProjectJsonDeprecatedWarning()

0 commit comments

Comments
 (0)