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

Code completion #209

Closed
wants to merge 3 commits into from
Closed

Conversation

alexfrasson
Copy link

@alexfrasson alexfrasson commented Aug 12, 2020

Enables Intellisense code completion for targets/packages within BUILD files.

#210

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@alexfrasson
Copy link
Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@alexfrasson alexfrasson changed the title Code completion WIP Code completion Aug 13, 2020
@alexfrasson alexfrasson force-pushed the code-completion branch 6 times, most recently from b2b88c6 to 1d108a0 Compare August 16, 2020 16:30
@alexfrasson
Copy link
Author

alexfrasson commented Aug 16, 2020

@allevato @laurentlb @thomasvl could I please get some feedback on this? 🙂

@alexfrasson alexfrasson changed the title WIP Code completion Code completion Aug 18, 2020
@cpsauer cpsauer mentioned this pull request Feb 4, 2021
@dvsorokin
Copy link

do you plan on reviewing and merging it?

@slsyy
Copy link

slsyy commented Mar 15, 2021

Is that project dead?

@martaver
Copy link

Hey come on, let's not ignore this man's hard work... we'd all benefit from this!

@cpsauer
Copy link

cpsauer commented Apr 18, 2021

Tagging @philwo, since it looks like he's the Googler who was most recently active on the project.

@philwo philwo requested a review from coeuvre April 20, 2021 12:17
@philwo
Copy link
Member

philwo commented Apr 20, 2021

Hey folks, thanks for tagging me. Unfortunately I really do not have any experience with TypeScript at all, so I'm not a good reviewer. 😅 But my colleague @coeuvre might be able to review this.

I'm happy to handle the releasing part later.

Copy link
Member

@coeuvre coeuvre 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 the PR. It looks awesome!

document: vscode.TextDocument,
position: vscode.Position,
) {
let candidateTarget = GetCandidateTargetFromDocumentPosition(
Copy link
Member

Choose a reason for hiding this comment

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

candidateTarget could be undefined. Please check before use.

import * as vscode from "vscode";
import { queryQuickPickTargets } from "../bazel";

function InsertCompletionItemIfUnique(
Copy link
Member

Choose a reason for hiding this comment

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

Function name should start with a lower case character to keep code style consistent. Please change this and following ones.

}

const completionItems = new Array<vscode.CompletionItem>();
this.targets.forEach((target) => {
Copy link
Member

Choose a reason for hiding this comment

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

this.targets could be undefined if refresh hasn't finished yet. Please check before use.

implements vscode.CompletionItemProvider {
private targets: string[] | undefined;

public provideCompletionItems(
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add comment to briefly explain how the completion works?

return completionItems;
}

public async refresh() {
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add comment to briefly explain how refresh works and why do we need it?

@cpsauer
Copy link

cpsauer commented May 13, 2021

@alexfrasson, are you still around?

(Bumping bc I got reminded of this PR, and he might not be after...almost a year. @coeuvre, any chance you'd be able to shepard this through if not?)

@cpsauer
Copy link

cpsauer commented Jul 30, 2021

Paging @alexfrasson :)

@cpsauer
Copy link

cpsauer commented Aug 5, 2021

@coeuvre, could I ask you to guide this through to merging? Looks like Alex is long gone, but it'd be really great to have.

@coeuvre
Copy link
Member

coeuvre commented Aug 10, 2021

Sure, I will fork this patch and create another PR.

@alexfrasson
Copy link
Author

@coeuvre Thank you for the review and sorry for not getting back to you sooner. I will have some free time next week and I could go over the PR again if you want.

@coeuvre
Copy link
Member

coeuvre commented Aug 10, 2021

That's great. Thanks!

@cpsauer
Copy link

cpsauer commented Sep 4, 2021

@alexfrasson, any chance you'd still be down to take a pass through so this can get landed?

@cpsauer
Copy link

cpsauer commented Sep 16, 2021

@coeuvre, could we revert to your guiding this through to merging? It'd be awesome to have.

@coeuvre
Copy link
Member

coeuvre commented Sep 17, 2021

Sure. I will look into this next week.

@philwo
Copy link
Member

philwo commented Oct 8, 2021

This was merged via #246 - thanks everyone for your patience and help!

@philwo philwo closed this Oct 8, 2021
@cpsauer
Copy link

cpsauer commented Oct 8, 2021

Wahoo! Thank you, all!

@cpsauer
Copy link

cpsauer commented Oct 13, 2021

@philwo, I'm wondering, ever eager, if there'a any chance of a release on the horizon? My team is super excited to use this one :)

Thanks again to you and @coeuvre for landing this and all the other fixes in the PR backlog over the last few days. Heroes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants