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

Add cc, py and java builtins #12

Closed
cameron-martin opened this issue Jan 31, 2024 · 6 comments · Fixed by #33
Closed

Add cc, py and java builtins #12

cameron-martin opened this issue Jan 31, 2024 · 6 comments · Fixed by #33

Comments

@cameron-martin
Copy link
Owner

#8 added some builtins, but this proto does not include things like cc_library. I'm not sure where these are meant to come from.

@daivinhtran
Copy link

I think cc_library is now migrated to Starlark?

@cameron-martin
Copy link
Owner Author

Is it, but they're still available at globals. Do you think the starlark builtins are exported differently to the java ones?

@daivinhtran
Copy link

The cc rules come from https://github.com/bazelbuild/rules_cc (Starlark implementation of cc rules). I believe if we can resolve http_archive and/or local_repository declaring @rules_cc, it should work.

@cameron-martin
Copy link
Owner Author

That repo still just calls builtins. I think they might be written in starlark now but in the bazel repo.

See https://github.com/bazelbuild/rules_cc/blob/51b77439a109b8c8f75ad70a130293291ed8b851/cc/defs.bzl#L49

@cameron-martin
Copy link
Owner Author

Builtins such as toolchain, toolchain_type and package also aren't included in this protobuf.

@cameron-martin
Copy link
Owner Author

Looks like we can use bazel info build-language here. See bazelbuild/vscode-bazel#1 (comment)

cameron-martin added a commit that referenced this issue Mar 16, 2024
This uses the proto returned from `bazel info build-language` to autocomplete builtin rules such as `cc_library`.

Fixes #12.
cameron-martin added a commit that referenced this issue Mar 16, 2024
This uses the proto returned from `bazel info build-language` to
autocomplete builtin rules such as `cc_library`.

Fixes #12.
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 a pull request may close this issue.

2 participants