Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 67 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,6 @@
"when": "view == bsv.bzl.package && viewItem != 'source file'",
"group": "inline@2"
},
{
"when": "view == bsv.bzl.package && viewItem != 'source file'",
"group": "inline@3"
},
{
"command": "bsv.bzl.package.explore",
"when": "view == bsv.bzl.package",
Expand Down Expand Up @@ -1178,7 +1174,7 @@
"uuid": "8.3.0",
"vscode-common": "1.50.0",
"vscode-extension-telemetry": "^0.1.6",
"vscode-languageclient": "6.1.3",
"vscode-languageclient": "^7.0.0",
"vscode-languageserver-protocol": "3.16.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/bzl/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export const ThemeIconReport = new vscode.ThemeIcon('report');
export const ThemeIconSymbolEvent = new vscode.ThemeIcon('symbol-event');
export const ThemeIconSymbolInterface = new vscode.ThemeIcon('symbol-interface');
export const ThemeIconVerified = new vscode.ThemeIcon('verified');
export const ThemeIconReload = new vscode.ThemeIcon('reload');

export enum ContextValue {
ProblemFile = 'problem-file',
Expand Down
2 changes: 1 addition & 1 deletion src/bzl/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as vscode from 'vscode';
import * as vlc from 'vscode-languageclient';
import * as vlc from 'vscode-languageclient/node';
import { Server } from './constants';


Expand Down
3 changes: 2 additions & 1 deletion src/bzl/view/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
ContextValue,
FileName,
ruleClassIconUri,
ThemeIconReload,
ViewName
} from '../constants';
import { BzlClientTreeDataProvider } from './bzlclienttreedataprovider';
Expand Down Expand Up @@ -94,7 +95,7 @@ export class BzlPackageListView extends BzlClientTreeDataProvider<Node> {
picker.items = items;
picker.buttons = [
{
iconPath: '$(reload)',
iconPath: ThemeIconReload,
tooltip: 'Load All Rules //... (this can be slow)',
},
];
Expand Down
2 changes: 1 addition & 1 deletion src/bzl/view/repositories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class RepositoryItem extends vscode.TreeItem {
public readonly client: BzlClient,
public readonly repo: Workspace,
public readonly desc: string,
public iconPath: string,
public iconPath: vscode.Uri,
) {
super(desc);
this.description = this.repo.cwd;
Expand Down
6 changes: 3 additions & 3 deletions src/bzl/view/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class BzlWorkspaceListView extends BzlClientTreeDataProvider<WorkspaceIte
export class WorkspaceItem extends vscode.TreeItem {
constructor(
public label: string,
public iconPath: string,
public iconPath: vscode.Uri,
) {
super(label);
this.command = {
Expand All @@ -195,7 +195,7 @@ export class WorkspaceItem extends vscode.TreeItem {
}

class DefaultWorkspaceItem extends WorkspaceItem {
constructor(icon: string) {
constructor(icon: vscode.Uri) {
super('DEFAULT', icon);
this.description = 'workspace';
this.tooltip = this.description;
Expand All @@ -206,7 +206,7 @@ class DefaultWorkspaceItem extends WorkspaceItem {
class ExternalWorkspaceItem extends WorkspaceItem {
constructor(
public readonly external: ExternalWorkspace,
icon: string,
icon: vscode.Uri,
private location: string,
) {
super('@' + external.name, icon);
Expand Down
4 changes: 2 additions & 2 deletions src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export class Container {
return Container._telemetry;
}

static media(name: MediaIconName): string {
return path.join(Container._context.extensionPath, 'media', name);
static media(name: MediaIconName): vscode.Uri {
return vscode.Uri.file(path.join(Container._context.extensionPath, 'media', name));
}

static dispose() {
Expand Down
2 changes: 1 addition & 1 deletion src/starlark/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
LanguageClient,
LanguageClientOptions,
ServerOptions,
} from 'vscode-languageclient';
} from 'vscode-languageclient/node';
import {
TextDocumentPositionParams,
Location,
Expand Down
6 changes: 3 additions & 3 deletions src/test/integration/feature.starlark.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { fail } from 'assert';
import { expect } from 'chai';
import { after, before, describe, it } from 'mocha';
import * as lsclient from 'vscode-languageclient';
import { LanguageClient } from 'vscode-languageclient';
import { LanguageClient } from 'vscode-languageclient/node';
import { platformBinaryName } from '../../constants';
import { GitHubReleaseAssetDownloader } from '../../download';
import { StardocLSPClient } from '../../starlark/client';
Expand Down Expand Up @@ -229,7 +229,7 @@ describe(StarlarkLSPFeatureName, function () {
const provider = client.getFeature(lsclient.HoverRequest.method).getProvider(document);
expect(provider).not.to.be.undefined;

const hover = await provider.provideHover(document, position, tokenSource.token);
const hover = await provider?.provideHover(document, position, tokenSource.token);
if (!hover) {
fail('expected defined hover result');
}
Expand Down Expand Up @@ -318,7 +318,7 @@ describe(StarlarkLSPFeatureName, function () {
const provider = client.getFeature(lsclient.DefinitionRequest.method).getProvider(document);
expect(provider).not.to.be.undefined;

const locs = await provider.provideDefinition(document, position, tokenSource.token);
const locs = await provider?.provideDefinition(document, position, tokenSource.token);
if (!locs) {
fail('expected defined locs result');
}
Expand Down