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

Quickpick targets for registered Bazel commands #28

Merged
merged 4 commits into from
Dec 7, 2018

Conversation

smukherj1
Copy link
Contributor

This also fixes #23

@allevato
Copy link
Member

allevato commented Dec 7, 2018

Please resolve the lint errors shown by Travis; see the instructions I added recently for the recommended development setup with TSLint and Prettier to help automate this.

Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

I think many (but not all) of my comments can be addressed with the automatic tooling; please verify that your VS Code setup is correct (and you may need to manually re-save each file to kick off the auto-formatting).

src/bazel/bazel_quickpick.ts Outdated Show resolved Hide resolved
src/bazel/bazel_quickpick.ts Outdated Show resolved Hide resolved
src/bazel/bazel_quickpick.ts Outdated Show resolved Hide resolved
// workspace
if (vscode.window.activeTextEditor === undefined) {
vscode.window.showErrorMessage(
"Unable to determine Bazel workspace. Open a file in the Bazel workspace",
Copy link
Member

Choose a reason for hiding this comment

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

Using the active editor to determine the default workspace is reasonable, but if the user doesn't have an editor open, we still have enough information to present the user with a choice if they have one or more folders added to their workspace. So we could present them with a choice of those, and then query that.

I have some thoughts on how to consolidate decisions like this into a workspace cache and state machine that we can use across multiple features, so you can leave this for now, but I wanted to mention it.

src/bazel/bazel_quickpick.ts Outdated Show resolved Hide resolved
src/extension/extension.ts Outdated Show resolved Hide resolved

/**
* Represents a Bazel target in a QuickPick items window. Implements the
* IBazelCommandAdapter interface so that it can be given directly to any of the
Copy link
Member

Choose a reason for hiding this comment

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

Nit: when writing symbols in JSDoc, use the notation {@code IBazelCommandAdapter}.

src/bazel/bazel_quickpick.ts Outdated Show resolved Hide resolved
src/bazel/index.ts Show resolved Hide resolved
Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

Thank you!

@allevato
Copy link
Member

allevato commented Dec 7, 2018

Your latest commit also fixes #17.

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.

Error when "Build Target (with Debugging)" commands are invoked from command palette
2 participants