소스 검색

Avoids some debugger calls

Adds app/env to startup logging
main
Eric Amodio 2 년 전
부모
커밋
5374a1de9b
4개의 변경된 파일22개의 추가작업 그리고 11개의 파일을 삭제
  1. +7
    -3
      src/extension.ts
  2. +7
    -2
      src/premium/github/githubGitProvider.ts
  3. +3
    -1
      src/premium/remotehub.ts
  4. +5
    -5
      src/vsls/vsls.ts

+ 7
- 3
src/extension.ts 파일 보기

@ -1,4 +1,5 @@
import { version as codeVersion, commands, env, ExtensionContext, extensions, window, workspace } from 'vscode';
import { isWeb } from '@env/platform';
import { Api } from './api/api';
import type { CreatePullRequestActionContext, GitLensApi, OpenPullRequestActionContext } from './api/gitlens';
import { Commands, executeCommand, OpenPullRequestOnRemoteCommandArgs, registerCommands } from './commands';
@ -37,7 +38,10 @@ export function activate(context: ExtensionContext): Promise
});
const sw = new Stopwatch(`GitLens${insiders ? ' (Insiders)' : ''} v${gitlensVersion}`, {
log: { message: ' activating...' },
log: {
message: ` activating in ${env.appName}(${codeVersion}) on the ${isWeb ? 'web' : 'desktop'}`,
//${context.extensionRuntime !== ExtensionRuntime.Node ? ' in a webworker' : ''}
},
});
if (insiders) {
@ -127,8 +131,8 @@ export function activate(context: ExtensionContext): Promise
container.ready();
sw.stop({
message: ` activated; app=${env.appName}(${codeVersion})${cfg.mode.active ? `, mode: ${cfg.mode.active}` : ''}${
exitMessage != null ? `, ${exitMessage}` : ''
message: ` activated${exitMessage != null ? `, ${exitMessage}` : ''}${
cfg.mode.active ? `, mode: ${cfg.mode.active}` : ''
}`,
});

+ 7
- 2
src/premium/github/githubGitProvider.ts 파일 보기

@ -19,6 +19,7 @@ import type { Container } from '../../container';
import {
AuthenticationError,
AuthenticationErrorReason,
ExtensionNotFoundError,
OpenVirtualRepositoryError,
OpenVirtualRepositoryErrorReason,
} from '../../errors';
@ -306,7 +307,9 @@ export class GitHubGitProvider implements GitProvider, Disposable {
const rootUri = remotehub.getProviderRootUri(uri).with({ scheme: DocumentSchemes.Virtual });
return rootUri;
} catch (ex) {
debugger;
if (!(ex instanceof ExtensionNotFoundError)) {
debugger;
}
Logger.error(ex, cc);
return undefined;
@ -1893,7 +1896,9 @@ export class GitHubGitProvider implements GitProvider, Disposable {
try {
remotehub = await this.ensureRemoteHubApi();
} catch (ex) {
debugger;
if (!(ex instanceof ExtensionNotFoundError)) {
debugger;
}
throw new OpenVirtualRepositoryError(
repoPath,
OpenVirtualRepositoryErrorReason.RemoteHubApiNotFound,

+ 3
- 1
src/premium/remotehub.ts 파일 보기

@ -19,7 +19,9 @@ export async function getRemoteHubApi(silent?: boolean): Promise
return api;
} catch (ex) {
Logger.error(ex, 'Unable to get required api from the GitHub Repositories extension');
debugger;
if (!(ex instanceof ExtensionNotFoundError)) {
debugger;
}
if (silent) return undefined;
throw ex;

+ 5
- 5
src/vsls/vsls.ts 파일 보기

@ -65,8 +65,6 @@ export class VslsController implements Disposable {
this._api = this.getLiveShareApi();
const api = await this._api;
if (api == null) {
debugger;
void setContext(ContextKeys.Vsls, false);
// Tear it down if we can't talk to live share
this._ready.fulfill();
@ -128,10 +126,12 @@ export class VslsController implements Disposable {
try {
const extension = extensions.getExtension<LiveShareExtension>('ms-vsliveshare.vsliveshare');
if (extension != null) {
const liveshareExtension = extension.isActive ? extension.exports : await extension.activate();
return (await liveshareExtension.getApi('1.0.4753')) ?? undefined;
const vslsExtension = extension.isActive ? extension.exports : await extension.activate();
return (await vslsExtension.getApi('1.0.4753')) ?? undefined;
}
} catch {}
} catch {
debugger;
}
return undefined;
}

불러오는 중...
취소
저장